- Upload the following in a text file named .htaccess to your document root (Web Directory):
RedirectMatch ^/$ http://domain/path/
This is how it works.
Visitor types in 'http://example.com/'
The browser connects to example.com:80 and asks for the url-path '/'
The web server sees the RedirectMatch directive:
The ^ means to starting match at the beginning
The $ means to end matching at the end
/ is the characters to match
Thus since the browser asked for '/', and there is nothing before the / and nothing after it, there will be a match.
If there is a match, Apache sees the second parameter, and that it begins with a scheme and hostname, and issues a redirect using status code 302 (vs 301 for permament redirects.)
Perl / MySQL / HTML+CSS