Welcome Guest, Not a member yet? Register   Sign In
htaccess: combine no index with no www
#1

[eluser]Unknown[/eluser]
I've been searching for how to combine in the htaccess the no index.php option along with a rewrite rule to omit the www. in the domain name.

I've only come so far to combine this, but doesn't work. Any hints on this?


Code:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^.*$ http://domain.com%{REQUEST_URI} [R=301,L]

Thanks! :-)




Theme © iAndrew 2016 - Forum software by © MyBB