Jak zprovoznit 3rd party software v Nette
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
- Kurtas
- Člen | 109
Ahoj,
potrebuji poradit chci do stavajiciho projektu nainstalovat The Bug Genie aby uzivatele mohli reportovat chyby nebo pozadavky … instalaci jsem provedl do /www/support/ … jenze ted mam problem s tim ze kdyz napr chci otevrit url www.domain.com/…ort/do/login … tak se objevi ladenka ktera rve No route for HTTP request – 404, proste nevim jak udelat, aby si nette nejake url nevsimalo.
Snad jsem to napsal srozumitelne .)
Diky Mira
- Kurtas
- Člen | 109
To tam mam, ale jaksi nic :(
# rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /support/
# skip all hidden files (starting with a .)
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.(html|wsdl|json|xml)$
RewriteRule .* - [L]
# redirect to front controller
RewriteRule ^(.*)$ index.php?url=$1 [NC,QSA,L]
</IfModule>
- Kurtas
- Člen | 109
To me taky napadlo, zkousel jsem neco najit na google, ale kua neni mi prano. Ja se taky moc s htaccess nekamaradim, zde jsou jednotlive htaccess snad nekdo chytreji poradi.
htaccess od nette
# Apache configuration file (see httpd.apache.org/docs/2.2/mod/quickreference.html)
# disable directory listing
OPTIONS -INDEXES
# enable cool URL
<IfModule mod_rewrite.c>
RewriteEngine ON
# RewriteBase /
#Toto by melo zakazat nette routovani pro adresar support
RewriteRule ^support/ - [L]
# front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L]
</IfModule>
# enable gzip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE TEXT/html TEXT/plain TEXT/xml TEXT/css application/X-javascript TEXT/javascript application/javascript application/json
</IfModule>
# allow combined JavaScript & CSS. Inside of script.combined.js you could use <!--#include file="script.js" -->
<IfModule mod_include.c>
<FilesMatch "\.combined\.(js|css)$">
OPTIONS +Includes
SetOutputFilter INCLUDES
</FilesMatch>
</IfModule>
htaccess z adresare support
# .htaccess file for The Bug Genie
# make sure that magic_quotes and register_globals is always off
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag register_globals off
</IfModule>
# rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /support/
# skip all hidden files (starting with a .)
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.(html|wsdl|json|xml)$
RewriteRule .* - [L]
# redirect to front controller
RewriteRule ^(.*)$ index.php?url=$1 [NC,QSA,L]
</IfModule>
# Stop people accessing directories they shouldn't have access to
RedirectMatch 403 ^/\.svn(/|$)