开发者

Apache RewriteRule .* index.php [NC,L] Not working

开发者 https://www.devze.com 2022-12-23 00:33 出处:网络
I am trying to redirect everything to a single page from my /website/folder/ directory. I added a simple .htaccess with this simple code (I know this would require more code in .htaccess but it\'s jus

I am trying to redirect everything to a single page from my /website/folder/ directory.

I added a simple .htaccess with this simple code (I know this would require more code in .htaccess but it's just a test).

RewriteEngine on
RewriteRule .* index.php [NC,L]

When I try :

http://127.0.0.1:8888/website/folder/fileDoesntExistMustGoIndex
开发者_JS百科

I have an "Object not found 404" error and the access.log display:

127.0.0.1 - - [13/Mar/2010:13:48:31 -0500] "GET /website/folder/fileDoesntExistMustGoIndexHTTP/1.1" 404 1118

I have check the httpd.conf and I see nothing that could alter this .htaccess statement. Any idea?

Edit:

RewriteEngine on
RewriteRule .* http://www.google.ca [NC,L]

This works... but not when I try to rewrite to a page of mine.


RewriteEngine On
RewriteBase /
RewriteRule . index.php

also try

RewriteLog "rewrite.log"
RewriteLogLevel 3

to see what happens

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号