开发者

mod rewrite +d error

开发者 https://www.devze.com 2023-01-31 06:29 出处:网络
I\'m using this .htaccess file: RewriteEngine on RewriteCond %{REQUEST_URI} .(html|php)$ [OR] RewriteCond -d

I'm using this .htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_URI} .(html|php)$ [OR]
RewriteCond -d
RewriteRule (.*) /index.php?s=$1 [L,QSA]

And if i try to access a site afflected by the rule i get an 500 Server Error.

My logs say:

[Fri Dec 17 13:40:43 2010] [alert] [client 127.0开发者_运维百科.0.1] C:/xampp/htdocs/.htaccess: RewriteCond: bad argument line '-d'

If i access something like that:

http://localhost/icon/help.png

There is no problem

Can someone help me please?


The RewriteCond needs to look like this:

RewriteCond %{REQUEST_FILENAME} !-d
0

精彩评论

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