apache - Too many redirects with Virtual Host and htaccess -
the issue im getting many redirects.
i have wamp server hosts few sites, have particular site 5 domains. want them point correct website folder , redirected single domain seo purposes. here looks in virtual hosts file:
<virtualhost 50.62.82.101> serveradmin info@hovaness.com documentroot "c:/wamp/www/example" servername example.com serveralias example.net www.example.com www.examples.net www.examples.com examples.com examples.net errorlog "logs/example.com.log"
htaccess file looks like:
rewriteengine on rewriterule ^(.*)$ http://sellingwarriors.com/$1 [r=301,l] rewritebase /
am supposed have 1 or other? have tried in htaccess file:
rewriteengine on rewritecond %{http_host} ^(.*?).example(s?).(.*)$ [nc] rewriterule ^(.*)$ http://example.com/$1 [r=301,l] rewritebase /
any appreciated
you need check hostname redirecting to, otherwise continue redirect:
rewriteengine on rewritecond %{http_host} !^example\.com$ [nc] rewriterule ^(.*)$ http://example.com/$1 [r=301,l]
Comments
Post a Comment