Forwarding of root URL only?

1

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

www.domain.com -> www.domain.com/holding

However

www.domain.com/home www.domain.com/index.php www.domain.com/*

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?

K20GH

Posted 2013-04-18T13:57:36.777

Reputation: 167

Why don't you add a simple piece of JS to a html file at domain.com – HackToHell – 2013-04-18T14:13:33.097

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 – 2013-04-18T14:22:59.827

Answers

1

Have a look at mod_rewrite's documentation

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

fuero

Posted 2013-04-18T13:57:36.777

Reputation: 206

0

Just add

Redirect / /holding

to you .htaccess or your Apache site configuration.

Stefan Seidel

Posted 2013-04-18T13:57:36.777

Reputation: 8 812