Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to redirect? It doesn't work for me

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
0
0
IL
Hi,

I have 3 domains which points to the same place:

I'm trying to redirect one of the domains ( to another page ( by using .htaccess file.

Code:
Redirect 301 [URL unfurl="true"]http://gomidjets.com/index.htm[/URL] [URL unfurl="true"]http://gomidjets.com/site/index.htm[/URL]

It doesn't work for me. What was made wrong? Is it possible to redirect only one of the three?

Many thanks!
 
I don't think you can do it with a straight redirect, you'll need to use mod_rewrite instead. I'm no expert, but something along these lines should do it...
Code:
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} ^gomidjets\.com [nc]
RewriteRule ^index\.htm$ [URL unfurl="true"]http://gomidgets.com/site/index.htm[/URL] [R,L]

</IfModule>
You might get better advice from forum65

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top