cancel
Showing results for 
Search instead for 
Did you mean: 

problem with 301 redirect on Plusnet???

N/A

problem with 301 redirect on Plusnet???

I have uploaded a .htaccess 301 redirect and It does not appear to do anything. Support tell me it should work as Apache is running on all the servers.

I had no problem with doing this on my previous ISP, so I'm sure I'm typing the text correctly:

redirect 301 /petethomas.plus.com http://www.petethomas.co.uk

(all one line with space between the addresses)

(old address: http://www.petethomas.plus.com
new address: http://www.petethomas.co.uk



So when you browse for my old web address ,I want to be redirected to the new domain

Thanks




--
Pete Thomas

7 REPLIES
N/A

RE: problem with 301 redirect on Plusnet???

> redirect 301 /petethomas.plus.com http://www.petethomas.co.uk

You have used the second parameter wrong.

The format of the command is.

redirect [status] <URL-path> <URL>

[] items are optional
<> are required.

The URL-path will be / and not the domain name.

EG
redirect 301 /echo/bravo http://www.thisthat.com/

This will direct people form, EG, http://www.theother.com/echo/bravo/ to the other site.

However, there is a pit fall to watch out with on .htaccess. A HTACCESS file will operat on every directory under URL-path if you are not careful.

Thus, if you have the other domain hosted inside a subdirectory of your nromal web-space, the .htaccess file will apply there too.

The only way around this, is to use mod_rewrite, or javascript/meta header redirection.
Community Veteran
Posts: 6,983
Thanks: 8
Registered: 10-04-2007

RE: problem with 301 redirect on Plusnet???

Why not just put the following html in an index file at your old address then if it is called it will divert to the new one after i second.

<META HTTP-EQUIV="refresh" content="1;url=http://www.YourNewDomainname/">
--
Regards
John
http://www.hmrg.co.uk
N/A

RE: problem with 301 redirect on Plusnet???

> > redirect 301 /petethomas.plus.com http://www.petethomas.co.uk
>
> You have used the second parameter wrong.
>
> The format of the command is.
>
> redirect [status] <URL-path> <URL>
>
> [] items are optional
> <> are required.
>
> The URL-path will be / and not the domain name.
>
> EG
> redirect 301 /echo/bravo http://www.thisthat.com/
>
> This will direct people form, EG, http://www.theother.com/echo/bravo/ to the other site.
>
> However, there is a pit fall to watch out with on .htaccess. A HTACCESS file will operat on every directory under URL-path if you are not careful.
>
> Thus, if you have the other domain hosted inside a subdirectory of your nromal web-space, the .htaccess file will apply there too.
>
> The only way around this, is to use mod_rewrite, or javascript/meta header redirection.

Thanks for this, but I'm a bit confused. I do want to direct from the plus.com to the .co.uk domain so it looks to me like I've got them the right way round. Is the problem that they are both exactly the same site, just that one is the actual address on Plusnet and the other is a domain name pointing at it?



--
Pete Thomas

N/A

RE: problem with 301 redirect on Plusnet???

> Why not just put the following html in an index file at your old address then if it is called it will divert to the new one after i second.
>
> <META HTTP-EQUIV="refresh" content="1;url=http://www.YourNewDomainname/">

Thanks, but I have been advised that some search engine spiders will penalize for this as it is commonly used by spammers. I am also concerned that as the redirect is an index page, the search engine rankings may fall due to lack of keywords in the text. I'd prefer not to risk this.

Pete



lwillis
Newbie
Posts: 7
Registered: 30-07-2007

RE: problem with 301 redirect on Plusnet???

The problem is that the syntax is wrong. It should read:

redirect 301 / http://www.petethomas.co.uk

[Unless of course your website really *is* stored in a sub-directory of the document root called petethomas.plus.com]

Changing to the above should help.
N/A

RE: problem with 301 redirect on Plusnet???

> The problem is that the syntax is wrong. It should read:
>
> redirect 301 / http://www.petethomas.co.uk
>
> [Unless of course your website really *is* stored in a sub-directory of the document root called petethomas.plus.com]
>
> Changing to the above should help.

Thanks

I tried that and then neither URLs work, on netscape I got the message

"Redirection limit for this URL exceeded, Unable to loadcthe requested page"

On IE page just doesn't load.

Pete

N/A

RE: problem with 301 redirect on Plusnet???

There is no way to do what you are asking with .htaccess file, due to the way your directories are structured.

.htaccess file use a recursive merge system, to check what settings should be applied. IE.

Your .plus.com space is stored in (eg) /usr/users/username/htdocs/

Your domain space is stored in /usr/users/username/htdocs/domain.name/

(These are examples)

The htaccess file doing the redirection, is read as follows.

/.htaccess
/usr/.htaccess
/usr/users/.htaccess
/usr/users/username/.htaccess
/usr/users/username/htdocs/.htaccess

Each file being merged into the existing records in memory.

The same applies to the domain. As such /usr/users/username/htdocs/.htaccess is affecting what happens to your domain.

There is no way to disable this activity, or to reset what is in memory. +Net may be able to help, by preventing any .htaccess affecting the domain, but this will limit you, and may not be possible with the +Net setup.