[mod_rewrite] marche dans httpd.conf pas avec .htaccess
hello,
je viens de tester le framework de Zend qui impose le mod_rewrite. J'ai ajoutere ceci dans le httpd.conf :
Code:
1 2 3 4 5 6 7
| <Location /zf>
RewriteEngine on
RewriteBase /zf/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /zf/index.php [L]
</Location> |
et cela marche.
Par contre, en le mettant dans un .htaccess, çà marche plus. Du coup, j'ai testé l'Url Rewritng avec mon Apache 2.2, j'ai fais un test tout bete :
1°) J'ai bien LoadModule rewrite_module modules/mod_rewrite.so dans httpd.conf
2°) Dans .htaccess à la racine du localhost :
Code:
1 2 3 4
| Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^test\.html$ /test.php [L] |
Donc, en tapant : http://localhost/test.html je devrais tomber sur mon fichier test.php... et ben non :(, j'ai un 404
Quequ'un sait pourquoi ?
Merci
Fabrice