Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a domain and I would like and visits to the root of the domain only to be forwarded. For example: ->


Will all still go to those locations. I believe this is a .htaccess modification, however I do not know how to do this.

Is anyone able to help?

share|improve this question
Why don't you add a simple piece of JS to a html file at – HackToHell Apr 18 '13 at 14:13
Going to the root will load up index.html first and index.php if there is no HTML. I already have an index.html file there that I require access to, but only want access if the user specifies it in the URL field – K20GH Apr 18 '13 at 14:22
up vote 1 down vote accepted

Have a look at mod_rewrite's documentation

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /holding [NC,L,R]
share|improve this answer

Just add

Redirect / /holding

to you .htaccess or your Apache site configuration.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .