Reputation: 69
I've looked at many other questions, but they don't seem to help me. This is my .htaccess file.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^/?(.*) http://domain.com/$1 [R,L]
RewriteCond %{REQUEST_URI} ^app_sys.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^app.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
I use CodeIgniter. PHP 5.4. Apache 2.4.6. Please correct me!
Upvotes: 0
Views: 127
Reputation: 2719
In your .htaccess rule
RewriteRule ^/?(.*) http://domain.com/$1 [R,L]
make this infinite redirects
I think you want make redirect from www.domain.tld to domain.tld forgot RewriteCond
for this rule
If you need this, then just add next line before this rule
RewriteCond %{HTTP_HOST} ^www.domain.com [nocase]
Upvotes: 1