Redirecting a Web address/url/etc

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
Ok... I've been messing with this for awhile now... trying mod_rewrite and redirect but with no luck.

I need to redirect: www.abc.com/subdir/ to www.xyx.com/subdir/

I created an index.htm with a meta refresh tag in it... and if I type the address into the address bar, it redirects like it should.

However, if I send a link to someone it just "redirects" to the www.abc.com homepage.

I'm sure I'm missing something... but can't figure out what.

Environment:

Windows 2003 Server
Apache 2

Any info would be helpful.

Thanks in advance.
 

PhatoseAlpha

Platinum Member
Apr 10, 2005
2,131
21
81
Are you using mod_rewrite, or trying to do this with plain redirects?

I'm not even sure plain redirects can handle wildcards.
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
Today I tried all kinds of things... but nothing seems to want to work... I assume I'm just missing something.

I played mostly with mod_rewrite.

I'm fairly new at this website stuff... so I'm still learning.

I'll look into CNames.

Any other ideas ??? I have until Monday to figure this out.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
Originally posted by: theknight571
Today I tried all kinds of things... but nothing seems to want to work... I assume I'm just missing something.

I played mostly with mod_rewrite.

I'm fairly new at this website stuff... so I'm still learning.

I'll look into CNames.

Any other ideas ??? I have until Monday to figure this out.

you should really post specific snippets of code
a rewrite could work, if done properly
 

TeamZero

Senior member
Apr 14, 2004
519
0
0
Since your server is Win2k3 I assume ASP is installed and configured.

<% Response.Redirect("www.xyx.com/subdir/ ") %>
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
Originally posted by: TeamZero
Since your server is Win2k3 I assume ASP is installed and configured.

<% Response.Redirect("www.xyx.com/subdir/ ") %>

I inherited this server and configuration... so I'm not sure where something like that would go.

I have discovered another bit of info....

Our site can be "gotten to" with two different names...

www.XXXabc.com and www.abc.com (sample names)

When you type in www.abc.com it gets translated into www.XXXabc.com before it's displayed... but I can't find where that translation takes place...

Our "network" guys aren't in this weekend... so I might have to wait until Monday morning to figure that out... but I think that anything beyond the www.abc.com gets lost during it's translation.

I.e. I type in www.abc.com/sub and it gets translated into www.XXXabc.com... losing the /sub

So... I think this is where my problem lies.

It they type in www.XXXabc.com/sub/ the index.htm file redirects them successfully... but www.abc.com/sub just dumps them directly to the sites homepage.
 

TeamZero

Senior member
Apr 14, 2004
519
0
0
Change the file extension on your index or default file to .asp if it isn't already, and stick my code anywhere in that file. It's just a server-side redirect.
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
Is that any different than using the meta tag redirect in a regular html file?

(META http-equiv="refresh" content="5;URL=...)

I'm begining to believe that the request isn't getting though the "name change" mentioned above.

But I'll give it a shot... ain't nuthin else worked yet.
 

QED

Diamond Member
Dec 16, 2005
3,428
3
0
Originally posted by: theknight571
Originally posted by: TeamZero
Since your server is Win2k3 I assume ASP is installed and configured.

<% Response.Redirect("www.xyx.com/subdir/ ") %>

I inherited this server and configuration... so I'm not sure where something like that would go.

I have discovered another bit of info....

Our site can be "gotten to" with two different names...

www.XXXabc.com and www.abc.com (sample names)

When you type in www.abc.com it gets translated into www.XXXabc.com before it's displayed... but I can't find where that translation takes place...

Our "network" guys aren't in this weekend... so I might have to wait until Monday morning to figure that out... but I think that anything beyond the www.abc.com gets lost during it's translation.

I.e. I type in www.abc.com/sub and it gets translated into www.XXXabc.com... losing the /sub

So... I think this is where my problem lies.

It they type in www.XXXabc.com/sub/ the index.htm file redirects them successfully... but www.abc.com/sub just dumps them directly to the sites homepage.


I know for Apache on Linux (and pretty sure for Apache on Windows), there is a configuration file (typically called httpd.conf) that allows for the configuration you have described. Look for a section called "Virtual Servers"...

I would look there before talking to the network folks (or at least in addition to), as it is a more likely cause of this.
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
Ok... got it figured out...

I was trying to use the correct commands... just in the wrong place.

At some point in the past, our site must have been hosted on a different (centralized) server.

It's on that server that the initial www.abc.com to www.XXXabc.com redirect is taking place.

It took me awhile, but I managed to get logged into that server and change it's .htaccess file.

Now it redirects like a charm.

Thanks to all that helped.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |