开发者

Mod Rewrite Confusion

I have a site that uses Mod_Rewrite rules. I am no expert and had to ask this question here. I have a rule in my .htaccess:

RewriteRule ^(.*)/$ /inner.php?p开发者_高级运维agename=$1 [QSA,L]

So on the site i calls the database based on the variable in the URL. But i added a wordpress blog on the site and it does not work.

The blog url is www.site.com/blog/ but it does not work if that rule is active. If i remove the rule it works fine. Is there a way to exclude /blog/ from this rule?


Add these lines before the rule. They prevent the rule from taking effect if a file or directory exist that match the URL:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜