开发者

htacess rewrite causing trouble for a wordpress install

Below is my htaccess that lets the user send a parameter by simply: http://www.site.com/PARAMETER. I have not got any trouble up until now everything works fine but I tried to install a wordpress-blog and put it under http://www.site.com/blog/ and now trying to access it, it does not work, the script enters the mode as when the parameter is false even if I try the exact URL: http://www.site.com/blog/index.php

IndexIgnore */*

RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)$ lista.php?kod=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ lista.php?kod=$1

RewriteEngine On
RewriteCond %{HTTP_HOST} ^site\.com$
RewriteRule (.*) http://www.site.com/$1 [R=301,L]

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
Rewri开发者_如何学PythonteCond %{HTTP_REFERER} !^http://(www\.)?site.com/.*$ [NC]
RewriteRule .(gif|jpg)$ � [F]

<Files .htaccess>
order allow,deny
deny from all
</Files>

Worth to note is that I have another page on http://www.site.com/b/page.php which I can acess just fine.


Try explicitly telling mod_rewrite to ignore requests that match existing directories or files. Example:

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [L]

When included at the top of the script (after RewriteEngine On), this should force the rewrite engine to stop rewriting a URL if it matches an existing directory or file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜