Bonjour,
Je construit une application suivant le motif MVC.
J'ai donc créé le fichier .htaccess suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
AddHandler x-httpd-php5 .php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA]
SI par exemple l'utilisateur écrit l'adresse http://www.monsite.net?rt=news/show :
Tout fonctionne il est redirigé sur index.php
MAIS S'il écrit :
http://www.monsite.net/bob.php (fichier qui n'existe pas) il n'est pas redirigé vers index.php (ce qui est mon objectif) mais une erreur est renvoyée :
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c Server at www.mdl06.net Port 80
Pourriez-vous aider ?
Merci !