开发者

Does Wordpress disable RewriteRule in .htaccess?

No matter what I do I can't get my Rewrite开发者_如何学CRule to work in my .htaccess file. I know the file is being processed. If I screw up the syntax, I get a 500 error on the server. If I use a Redirect line, it functions okay. But RewriteRule won't work, even if I use static values. No errors in the log.

My rule is as follows:

RewriteRule ^/content/([^/]+)/([^/]+)\.html$ http://www.mydomain.com/content/$1/ [NC,R=301,L]


Very odd fix on this. While a Redirect 301 line would work fine in the .htaccess file, RewriteRule wouldn't. However, there are multiple .htaccess files in the Wordpress file system, and putting the RewriteRule I wanted in a different .htaccess file did work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜