开发者

Does Wordpress disable RewriteRule in .htaccess?

开发者 https://www.devze.com 2023-04-11 13:51 出处:网络
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 Redir

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

精彩评论

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