Forum Moderators: phranque

Message Too Old, No Replies

How can I redirect a sub page of a 301 domain

         

Arturo99

4:55 pm on Jun 18, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



Hi
I have a domain set up as a 301 at the registrar to my new domain.
But how can i redirect a particular sub page of old domain and point
that to a sub page on my new domain?
Registrar does not allow it.

Can i do it via htaccess on my new domain?
thanks
Arturo

lucy24

8:41 pm on Jun 18, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can either do everything via htaccess, or you can do things globally at the registrar level, but it is very unlikely you will be able to mix the two. Once you've set up the DNS to point to some physical location that is under your own control, you can redirect to your heart's content.

Anthonyandrews

7:19 am on Jun 19, 2018 (gmt 0)

5+ Year Member



And the physical location has to be a fully hosted site?

keyplyr

7:32 am on Jun 19, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



how can i redirect a particular sub page of old domain and point
that to a sub page on my new domain?
The best way is to set up a 301 redirect in the htaccess of the old domain.

Another (easy way) is to use a Meta Refresh redirect in the HEAD of the old page.

<meta http-equiv="refresh" content="0; url=http://new-domain.com/page.html">

keyplyr

8:50 am on Jun 19, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



[added]
However the Meta tag method will not update SE indexing. The htaccess 301 method will.

phranque

9:50 am on Jun 19, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



in either case you must be hosting your own web server to redirect individual url requests.

keyplyr

9:55 am on Jun 19, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



in either case you must be hosting your own web server to redirect individual url requests.
Shared hosting is fine unless the admins restrict it.

phranque

10:25 am on Jun 19, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Shared hosting

is still your web server, as opposed to a server provided by your registrar as the OP implies...

keyplyr

10:27 am on Jun 19, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



OK, I understand what you meant now.

lucy24

5:39 pm on Jun 19, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



And the physical location has to be a fully hosted site?
Depends what you mean by “fully hosted”. In theory you could set up a directory whose sole purpose is to receive requests and redirect them to an entirely different server. If we’re talking about shared hosting, it’s up to the host whether there has to be an actual domain living at the first address (the one you’re redirecting away from). In fact it may be an academic distinction: if all requests for example.com are redirected to example.org, it can’t possibly make any difference whether there is a physical file corresponding to example.com/index.html.

phranque

9:17 pm on Jun 19, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



And the physical location has to be a fully hosted site?

it could be another virtual host configuration on the same machine your main site is on.
it could even specify the same document root directory so you can do all your redirects for both domains in one place...

Anthonyandrews

10:55 pm on Jun 20, 2018 (gmt 0)

5+ Year Member



Thanks for the directions and tips
Arturo