301 redirect from www.domain.com/index.html to www.domain.com not working?

Add ServerAlias domain.com" rel="nofollow">domain.com in a new row after ServerName domain.com.

Thanks beerwin it was helpful – munna Sep 22 at 6:18 then please accept this answer – beerwin Oct 13 at 8:43 it's done... accepted... thanks again... – munna Oct 13 at 11:05 glad my answer worked. – beerwin Oct 13 at 17:41 +1 to compensate. – Johan Sep 221 at 21:32.

It sounds like it's applying the first redirect before trying the second one. Have you tried putting the Redirect lines in the other order? Redirect 301 /index.

Html domain.com/" rel="nofollow">domain.com/ Redirect 301 / domain.com.

Thanks! I've tried doing so... but no luck... – munna May 23 at 10:42.

Usualy this is achieved by using a more general approach with mod_rewrite : This code should be placed in the htaccess file in the root of your domain, i.e. Domain. Com/.

Htaccess or the virtualhost configuration. RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^domain\. Com$ RewriteRule ^(.*)$ domain.com/$1 R=301,L ( e.g. Also here Forcing the www prefix with PHP/htaccess/mod_rewrite ).

Conf) we had virtual host configuration, which is working for last 2 years. Today to there no problem with it. But when I was asked to add redirection to it, it's not working.

Here when I'm typing "domain.com" it is taking to "domain.com" rel="nofollow">domain.com" expected behaviour. But when I type "domain.com/index. Html" or "domain.com" rel="nofollow">domain.com/index.

Html" it is not taking me to "domain.com" rel="nofollow">domain.com"...it is joomla website.

Related Questions