开发者

htaccess rule question

开发者 https://www.devze.com 2023-02-24 08:43 出处:网络
I have a htaccess which looks like this:开发者_开发技巧 RewriteEngine on RewriteCond $1 !^(index\\.php|images|css|js|robots\\.txt|favicon\\.ico)

I have a htaccess which looks like this:

开发者_开发技巧
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [QSA]
RewriteRule ^$ /naujausios [L,R] 

And I'm not sure where to put this:

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

for it to work properly - I tried a few modifications to the keys at the end, without success - I just end up with a 500 response. Thanks for your help!


I had conflicts wherever I put it, but the solution was to put the www bit rewrite at the very top just after RewriteEngine on

0

精彩评论

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