开发者

Problem with rewrite rule

开发者 https://www.devze.com 2023-01-13 06:13 出处:网络
Can anyone explain to me why this rewrite rule doens\'t work: RewriteRule ^architecture/([a-zA-Z_]+)/(.*).html$ web/index.php?field=1&sub=$1&name=$2

Can anyone explain to me why this rewrite rule doens't work:

RewriteRule ^architecture/([a-zA-Z_]+)/(.*).html$ web/index.php?field=1&sub=$1&name=$2

on this url: http://localhost/greenlinked1-6.com/architecture/projects/84-test-deeplink-test.html

And what I should do to get it working. I've tried to find the answer in several articles but I开发者_StackOverflow can't figure it out.


Your .htaccess file should be placed in the directory greenlinked1-6.com. Make sure there are no conflicting rules, like this:

RewriteRule ^(.+)$ $1 [L]
# This line will never be be matched
RewriteRule ^architecture/([a-zA-Z_]+)/(.*).html$ web/index.php?field=1&sub=$1&name=$2


check that u havn't used RewriteBase / just remove & try again...

0

精彩评论

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