Forum Moderators: phranque

Message Too Old, No Replies

htaccess redirect

Need help creating an htaccess file

         

testbob

10:49 pm on Jul 2, 2004 (gmt 0)



Hi All

I've scoured the net looking for an htaccess file with no luck. I'm really hoping someone will be able to assist me with this.

I have a domain that was recently registered. It has a ton of links from other websites to subdomains on my domain. The previous owner obviously used subdomains.

I don't want to lose this traffic. Is there any way I can setup an htaccess file. This file would redirect ALL trafic to subdomains to a given page say [mydomain...]

Ideally, eventhough the traffic has been redirected to this page, what would make it perfect would be if in the address field in IE, it would show the address of the subdomain that the person originally went to.

Thank you for your help.

Stefan

4:32 am on Jul 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey Bob

Welcome to WebmasterWorld.

I'm assuming that your site is hosted using Apache not Windows, (Bill doesn't like people to be able to control their own sites using things like htaccess).

Your question would probably be better posted to the Apache forum, but to simply create an htaccess file, you just use Wordpad etc to make a file htaccess.txt, (so that it will ftp to the site in ascii rather than bin), and upload it to the folder where all your htm pages are located. When it's there, change the file name to .htaccess with no file extension, (put the dot at the front). For what you put in it, you should read up online and look through posts in the Apache Web Server forum.

(Others, please note that I'm trying to make it simple for Bob, not giving a primer in htaccess)