开发者

Redirect specific page via htaccess

开发者 https://www.devze.com 2023-01-07 04:37 出处:网络
I have a CodeIgniter site and the problem is I have: RewriteCond %{HTTP_HOST} ^example\\.com RewriteRule ^(.*)$ http://www.exampl开发者_开发知识库e.com/$1 [R=permanent,L]

I have a CodeIgniter site and the problem is I have:

RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.exampl开发者_开发知识库e.com/$1 [R=permanent,L]

But this results in people going from example.com to www.example.com/index.php/

I'd like them simply to go to www.example.com

Any ideas? Also, if they're at example.com/page1 they should go to www.example.com/page1

Thanks


Apache is rewriting / to /index.php/ before that rule is processed. Try moving it to the top of the file.

0

精彩评论

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