Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
301 redirect for search engine optimisation
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: 301 redirect for search engine optimisation
301 redirect for search engine optimisation
25-10-2010 3:49 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi everyone,
I'm trying to put in place a 301 redirect so that web pages to http://tecker.co.uk get redirected to http://www.tecker.co.uk by using a .htaccess file I've created and put in the root of my webspace.
There are two examples I've found on this forum:
and
The first one from http://community.plus.net/forum/index.php/topic,71144.0.html gives me a server error 500.
The second one from http://community.plus.net/forum/index.php/topic,72510.0.html does nothing, no error, no redirect.
Does anyone have any idea why it's not working?
Thanks in advance,
Matt.
I'm trying to put in place a 301 redirect so that web pages to http://tecker.co.uk get redirected to http://www.tecker.co.uk by using a .htaccess file I've created and put in the root of my webspace.
There are two examples I've found on this forum:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^tecker\.co\.uk [NC]
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)$ http://www.tecker.co.uk/$1?%1 [R=301,L]
and
RewriteEngine on
RewriteCond %{HTTP_HOST} ^tecker.co.uk [NC]
RewriteRule ^(.*)$ http://www.tecker.co.uk/$1 [L,R=301]
The first one from http://community.plus.net/forum/index.php/topic,71144.0.html gives me a server error 500.
The second one from http://community.plus.net/forum/index.php/topic,72510.0.html does nothing, no error, no redirect.
Does anyone have any idea why it's not working?
Thanks in advance,
Matt.
2 REPLIES 2
Re: 301 redirect for search engine optimisation
26-10-2010 12:09 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
SOLVED
After some more research it turned out there were two copies of the website, one at ftp.plus.net and another at cshell.plus.net
Pinging both sites returned two different ip addresses.
I put the redirect on the ftp version (the non-www) and it worked, I guess by putting the redirect on the other site it caused a loop (and therefore an error) as it would have been redirecting to itself.
If you're interested I used the second version of the code above.
Cheers,
Matt.
After some more research it turned out there were two copies of the website, one at ftp.plus.net and another at cshell.plus.net
Pinging both sites returned two different ip addresses.
I put the redirect on the ftp version (the non-www) and it worked, I guess by putting the redirect on the other site it caused a loop (and therefore an error) as it would have been redirecting to itself.
If you're interested I used the second version of the code above.
Cheers,
Matt.
Re: 301 redirect for search engine optimisation
26-10-2010 4:22 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Glad to hear you've solved this. The ftp site is homepages (with an htdocs folder) whereas cshell is ccgi (which is entered at /). I couldn't see any reason why the second version wouldn't work on homepages or ccgi.
On cshell/ccgi the first version of the code would give a server Error 500 because the Options line is not permitted (security issue). Without that it would probably have done nothing just as the second one did.
The reason for nothing being done (as previously set up) is that there is nothing to do; any cshell/ccgi call would have the hostname starting with www so the condition will fail.
On cshell/ccgi the first version of the code would give a server Error 500 because the Options line is not permitted (security issue). Without that it would probably have done nothing just as the second one did.
The reason for nothing being done (as previously set up) is that there is nothing to do; any cshell/ccgi call would have the hostname starting with www so the condition will fail.
David
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: 301 redirect for search engine optimisation