|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 2
|
|
| Author |
|
|
Stranger Joined: Dec 16, 2008 Post Count: 1 Status: Offline |
We have a website with a main domain and half a dozen domains aliased to it. I don't know if this is possible but what we are trying to achieve, via .htaccess, is that if someone arrives at one of the domain aliases they are sent to a specific page on the main domain e.g. someone arrives at the aliased domain domainb.com and is sent to domaina.com/somefile.htm Everything I have tried so far either has no effect or else returns a 500 internal server error. These attempts include: simple 301 redirects mod rewrite redirects Given that the one domain is purely an alias is it even possible to redirect someone from an alias to a file on the real domain using .htaccess? P.S sorry if wrong place. ---------------------------------------- Vietnam resort, Vietnam holiday||Tour to Sapa from Hanoi||Asia Beach Holiday - Vacation Packages to Vietnam Beaches |
||
|
|
Advanced Member USA Joined: Mar 24, 2005 Post Count: 3000 Status: Offline |
The htaccess file will need to exist inside of domainb.com's zone. If the master domain on the host account is domaina.com, the server will not know that someone is using domainb.com to arrive. I'm not sure what options you have available with your registrar and hosting company, but see if the host company has 'add on domains' - this is different than parked domains. If they do, it creates an account for domainb.com on your existing hosting account. It should create a directory of its own. Then in that directory, you can place your redirect code. Or, your domain registrar may have domain forwarding. you can forward domainb.com to a directory on your web server and add your redirect in there. You can try 2 different ways to redirect depending upon what your server supports: .htaccess: Redirect 301 / http://www.domaina.com/somefile.htm OR Redirect Permanent / http://www.domaina.com/somefile.htm some cPanel based servers use the second method with PHP: add an index.php file to the directory with: <?php---------------------------------------- "The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo Save the developers<!> Maine Webworks |
||
|
|
|
|
|
Current timezone is GMT Mar 21, 2010 8:33:16 AM |