|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
i have a problem with my php/apache server. if a user goes to the URL http://url/index.php/ (extra slash) he will NOT get an error but a page without any image how can i return a 404 error ? i tested RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*) $1 but doesn't work :-( |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
serri_amir@yahoo.fr (BiggeR) writes:
> RewriteEngine on > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^/(.*) $1 > > but doesn't work :-( I'm not sure I understand what you want from mod_rewrite, but here, something like "/index.php/" will be rewriten "/index.php/" (no change, you rule does not do anything in fact). If you want it to be rewriten in "/index.php" , maybe you should try: RewriteRule ^/(.*)/.* $1 Everything of the form "/something/bla/blo/foo" will be rewritten to "/something". Is it what you want? mod_rewrite can return HTTP error (see http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html) Marc |
|
![]() |
| Outils de la discussion | |
|
|