Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14611 reviews 1734 hosting providers

Questions & Answers

How to Redirect all traffic to the root ?

Nov 23, 2012 by DinoGuy
Hi all..

I want  to redirect all the traffic coming to a specific  URL on my  website to the root of my domain , I think it’s possible but  I am not sure how. If anyone knows please help me out.
Thanks in advanced.

1 Answer

0 votes
Nov 23, 2012 by SmartHost
Just copy the .htaccess  file to the root directory of your site, then add the following code inside the file (.htaccess)
RewriteEngine on
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) / [R=301,L]

Then save the file.