|
Next: Suggestions for back-end management application f..
|
| Author |
Message |
External

Since: Jul 02, 2004 Posts: 5
|
(Msg. 1) Posted: Sat Jul 03, 2004 1:52 am
Post subject: htaccess redirects Archived from groups: alt>www>webmaster (more info?)
|
|
|
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
http://www.mydomain/thispage.html
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. >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Sep 14, 2004 Posts: 2384
|
(Msg. 2) Posted: Sat Jul 03, 2004 2:24 am
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Anna wrote:
> 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
<font color=purple> > given page say <a style='text-decoration: underline;' href="http://www.mydomain/thispage.html</font" target="_blank">http://www.mydomain/thispage.html</font</a>>
>
> 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.
As I understand it. If you do not have DNS entries for the subdomains,
then the requests for the old subdomains won't even reach your .htaccess
file. So there would be no way you could redirect them.
If you knew the names of the subdomains, you could do this, but I don't
imagine that is feasible for you.
On the other hand, if you were talking about subdirectories like
<a style='text-decoration: underline;' href="http://www.mydomain.com/oldsubdirectory/" target="_blank">http://www.mydomain.com/oldsubdirectory/</a> then they could be easily
handled.
I send all these to the homepage thus:
ErrorDocument 404 /
Not what you are after, but works fine for me.
In this case, you would see "oldsubdirectory" in your access and error
logs.
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://CharlesSweeney.com" target="_blank">http://CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Oct 20, 2003 Posts: 294
|
(Msg. 3) Posted: Sat Jul 03, 2004 12:25 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Anna wrote:
> 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
<font color=purple> > say <a style='text-decoration: underline;' href="http://www.mydomain/thispage.html</font" target="_blank">http://www.mydomain/thispage.html</font</a>>
>
> 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.
Maybe something like (untested)
RewriteEngine on
RewriteRule subdomain1.site.com c [R]
RewriteRule subdomain2.site.com <a style='text-decoration: underline;' href="http://www.subdomain2.newdomain.com/page2" target="_blank">http://www.subdomain2.newdomain.com/page2</a> [R]
etc
An alternative would be
RewriteCond %{HTTP_HOST} subdomain1.site.com
RewriteRule ^$ <a style='text-decoration: underline;' href="http://www.subdomain1.newdomain.com/page1" target="_blank">http://www.subdomain1.newdomain.com/page1</a> [R]
etc
gtoomey
<a style='text-decoration: underline;' href="http://www.ausinvestor.com" target="_blank">www.ausinvestor.com</a> Australian Investor Forum<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 4) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Anna" <no DeleteThis @spam.com> wrote in message news:bHlFc.1401$WB5.1037@pd7tw2no...
> 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
<font color=purple> > <a style='text-decoration: underline;' href="http://www.mydomain/thispage.html</font" target="_blank">http://www.mydomain/thispage.html</font</a>>
>
Unless you know the names of the sub-domains, AND they have a A record in the DNS
zone file for your domain, you are outa luck. Anyone trying the link to a
sub-domain will get a cannot find server page.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Jul 02, 2004 Posts: 5
|
(Msg. 5) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thanks for the response. If an htaccess file would not work, can you think
of any other alternative that meets my need. You are correct in that I
don't know all the previous subdomains that used to exist.
"Bill Logan" <who.DeleteThis@what.com> wrote in message news:40e615f1@clear.net.nz...
>
> "Anna" <no.DeleteThis@spam.com> wrote in message news:bHlFc.1401$WB5.1037@pd7tw2no...
> > 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
<font color=green> > > <a style='text-decoration: underline;' href="http://www.mydomain/thispage.html</font" target="_blank">http://www.mydomain/thispage.html</font</a>>
> >
> Unless you know the names of the sub-domains, AND they have a A record in
the DNS
> zone file for your domain, you are outa luck. Anyone trying the link to a
> sub-domain will get a cannot find server page.
>
>
>
><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 27, 2004 Posts: 204
|
(Msg. 6) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Anna" wrote:
: If an htaccess file would not work, can you think
: of any other alternative that meets my need.
A custom 404 that contains your site menu and an intro to your site?
Lois >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 27, 2004 Posts: 204
|
(Msg. 7) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
: "Anna" wrote:
: : If an htaccess file would not work, can you think
: : of any other alternative that meets my need.
:
Lois wrote:
: A custom 404 that contains your site menu and an intro to your site?
Actually, I think that would work for main domain previous page names, e.g.
if the previous owner had domain.com/resume.html and you don't, but I don't
think it'll work for previous subdomains if you don't have the same
subdomain names now.
Lois >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Jul 02, 2004 Posts: 5
|
(Msg. 8) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
But how would I redirect any and all subdomains to this custom 404. The
dilemma is that I don't know all the subdomains the previous domain owner
used to have.
"Lois" <auto-newsgroups.RemoveThis@wordsweave.com> wrote in message
news:oPrFc.104$PO3.11@fe39.usenetserver.com...
> "Anna" wrote:
> : If an htaccess file would not work, can you think
> : of any other alternative that meets my need.
>
> A custom 404 that contains your site menu and an intro to your site?
>
> Lois
>
>
><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 27, 2004 Posts: 204
|
(Msg. 9) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Anna" asked:
: But how would I redirect any and all subdomains to this custom 404. The
: dilemma is that I don't know all the subdomains the previous domain owner
: used to have.
I was thinking that it would catch any pages that you don't already have,
but I realized after my first post that a custom 404 works for only one
domain or subdomain.
If you can set up subdomains where your site is, you might be able to find
some of the subdomain names via a Google search for your domain name, and
then set up those subdomains with a custom 404 for each subdomain.
Lois >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 25, 2004 Posts: 148
|
(Msg. 10) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Anna wrote:
> But how would I redirect any and all subdomains to this custom 404. The
> dilemma is that I don't know all the subdomains the previous domain owner
> used to have.
So what? Use a wildcard DNS entry pointing to your web server. Then on
your web server look at the 'Host' HTTP header and if it's
'something.example.net' but not 'www.example.net' then redirect to the
desired page.
Simple.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me - <a style='text-decoration: underline;' href="http://www.goddamn.co.uk/tobyink/?page=132" target="_blank">http://www.goddamn.co.uk/tobyink/?page=132</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Sep 19, 2003 Posts: 3499
|
(Msg. 11) Posted: Sat Jul 03, 2004 5:12 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Anna wrote:
> But how would I redirect any and all subdomains to this custom 404.
> The dilemma is that I don't know all the subdomains the previous
> domain owner used to have.
perhaps the wayback machine and/or google et al may help.
--
William Tasso<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 12) Posted: Sat Jul 03, 2004 5:14 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Gregory Toomey" <nospam RemoveThis @bigpond.com> wrote in message
news:4287335.UILjxyn6UM@GMT-hosting-and-pickle-farming...
> Anna wrote:
>
> > 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
<font color=green> > > say <a style='text-decoration: underline;' href="http://www.mydomain/thispage.html</font" target="_blank">http://www.mydomain/thispage.html</font</a>>
> >
> > 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.
>
> Maybe something like (untested)
>
> RewriteEngine on
> RewriteRule subdomain1.site.com c [R]
<font color=purple> > RewriteRule subdomain2.site.com <a style='text-decoration: underline;' href="http://www.subdomain2.newdomain.com/page2</font" target="_blank">http://www.subdomain2.newdomain.com/page2</font</a>>
[R]
> etc
>
>
> An alternative would be
>
> RewriteCond %{HTTP_HOST} subdomain1.site.com
> RewriteRule ^$ <a style='text-decoration: underline;' href="http://www.subdomain1.newdomain.com/page1" target="_blank">http://www.subdomain1.newdomain.com/page1</a> [R]
> etc
>
That would mean the OP would need to know the names of the sub-domains AND they
had an entry in the DNS. In which case, a simple entry for each in the httpd.conf
would suffice.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Sep 14, 2004 Posts: 2384
|
(Msg. 13) Posted: Sat Jul 03, 2004 8:33 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Toby A Inkster wrote:
> Anna wrote:
>
>> But how would I redirect any and all subdomains to this custom 404.
>> The dilemma is that I don't know all the subdomains the previous
>> domain owner used to have.
>
> So what? Use a wildcard DNS entry
Is that just a case of using an asterisk for the host name?
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://CharlesSweeney.com" target="_blank">http://CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2004 Posts: 1010
|
(Msg. 14) Posted: Sat Jul 03, 2004 9:33 pm
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Anna" <no.TakeThisOut@spam.com> wrote in message news:8ZrFc.7652$WB5.1608@pd7tw2no...
> But how would I redirect any and all subdomains to this custom 404. The
> dilemma is that I don't know all the subdomains the previous domain owner
> used to have.
>
Simple answer, as Charles and I have both pointed out - you cant.
Anyone typing a sub-domain into their browsers address bar or clicking on an old
link to same will get a server not found. Reason is a sub-domain needs a dns
entry in the parent domains zonefile in order to be found. If you do not know
the sub-domain names and they do not have an A record in your domains DNS any
query for sub-domain.yourdomain.com will fail.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |
External

Since: Apr 25, 2004 Posts: 148
|
(Msg. 15) Posted: Sun Jul 04, 2004 12:29 am
Post subject: Re: htaccess redirects [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Charles Sweeney wrote:
> Toby A Inkster wrote:
>
>> Anna wrote:
>>
>>> But how would I redirect any and all subdomains to this custom 404.
>>> The dilemma is that I don't know all the subdomains the previous
>>> domain owner used to have.
>>
>> So what? Use a wildcard DNS entry
>
> Is that just a case of using an asterisk for the host name?
That's often how you configure it, though your DNS server must support it.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me - <a style='text-decoration: underline;' href="http://www.goddamn.co.uk/tobyink/?page=132" target="_blank">http://www.goddamn.co.uk/tobyink/?page=132</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: htaccess redirects |
|
| Back to top |
|
 |  |