Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
Permanent 301 Redirect
#91
Posted 16 January 2005 - 02:13 PM
The exact how depends on your server technology
#92
Posted 16 January 2005 - 02:28 PM
nathan
#93
Posted 16 January 2005 - 02:34 PM
If it's the site in your profile, or another site on the same server, it looks like you're running on a *nix server. If that's the case, the following should do it as long as your host allows you to use .htaccess files:
- Change the DNS back to the way it was before.
- In any simple text editor (Notepad, etc ... not Word) open a new file and put the following line in itCODERedirect 301 / http://www.preferreddomain.com/
- Save that as a file named .htaccess
- Upload it to the root level of your non-preferred domain.
#94
Posted 16 January 2005 - 02:40 PM
I did it like this because for some reason the regular redirects were giving me a limit exceeded message.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domainone\.com
RewriteRule ^(.*)$ http://www.domaintwo.com/$1 [R=permanent,L]
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domainone\.com
RewriteRule ^(.*)$ http://www.domaintwo.com/$1 [R=permanent,L]
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domaintwo\.com
RewriteRule ^(.*)$ http://www.domaintwo.com/$1 [R=permanent,L]
don't know if this is the best way.
but it seems to be working.
nathan
#95
Posted 16 January 2005 - 05:37 PM
#96
Posted 16 January 2005 - 09:23 PM
Lemme think on it for a moment to see if I get any inspiration.
#97
Posted 17 January 2005 - 05:02 PM
Everything I've thought of using .htaccess is going to cause a loop of one sort or another since /dir/ and /dir/index.htm is actually loading the same page.
I can tell you how to do it in PHP by detecting the $_SERVER['SCRIPT_NAME'] variable and then doing a header redirect if index.php appears in the url address. But having Apache do the redirect is considerably trickier.
Anybody else have any thoughts? I feel like I'm missing something.
#98
Posted 17 January 2005 - 05:12 PM
Ah well...
#99
Posted 03 February 2005 - 05:09 PM
Are .htaccess and PHP 301 redirects treated the same by search engines?
Thanks.
#100
Posted 03 February 2005 - 07:24 PM
#101
Posted 08 February 2005 - 06:25 AM
have got access to the .htaccess file with my host but just wondering do I need to add anything
We have changed all our pages to .php from .html to utilise our database info etc.
The main links showing are all to our index page without any suffix (ie www.mydomain.com) so no problem there but I was wondering do i need to ad the 301 to the rest of the pages that have been indexed or should I wait for the purge?
We are on apache servers uploading in ASCII
Thanks guys and keep up the great work.
Edited by magicboxgifts, 08 February 2005 - 06:46 AM.
#102
Posted 08 February 2005 - 11:52 AM
If your file names remained constant except for the extension change, the easiest way to do that is:
What that does is take any request for <anyfilename>.html and automatically redirects to <anyfilename>.php
#103
Posted 08 February 2005 - 12:18 PM
#104
Posted 08 February 2005 - 12:48 PM
#105
Posted 08 February 2005 - 03:15 PM
As would Qwerty's solution, if your host allows that type of manipulation.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





This topic is locked


