|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Search Engine Optimization Forum SEO is much easier with help from peers and experts! The WebProWorld SEO forum is for the discussion and exploration of various search engine optimization topics. Any non (engine) specific SEO or SEM topics should go here. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a pretty big site with a lot of html and php pages including a wordpress blog with over 300 entries. I plan on copying the entire site to a new domain name and keeping the same suffix structure. So, the page www.oldsite.com/subject.html would now be www.newsite.com/subject.html and www.oldsite.com/blog/article123/ would now be www.newsite.com/blog/article123/
What would be the easiest way to setup the 301 redirect so links to internal pages on the old site reach the same internal page on the new site? i.e. - a person clicking on a link to www.oldsite.com/subject.html would be taken to www.newsite.com/subject.html.
__________________
Health Insurance Colorado | Read about Shifting the burden of proof - "Argument from ignorance" |
|
|||
|
It's easy. Create a .htaccess file in the old domain:
Code:
RedirectPermanent / http://www.newsite.com/ |
|
|||
|
Wow. That's way too easy! And the search engines will pass on the rank they have for each internal page in the old site to the internal page in the new site with the same page name huh?
I was planning on having to go into each page in the old site and give it a specific redirect to its new page. You just saved me a LOT of time, thanks!
__________________
Health Insurance Colorado | Read about Shifting the burden of proof - "Argument from ignorance" |
|
||||
|
Quote:
See this thread for help: Canonicalization Prevention Guide and make a Google search site:webproworld.com 301 redirect for more threads on this forum.
__________________
M.-J. Taylor SEO Web Design by Cyber Key Search Smart DesignŽ SEO Copywriter & Traveling Vacation Gypsy |
|
|||
|
Quote:
Jean-Luc |
|
||||
|
I fully agree with the suggestion of Jean-Luc.
__________________
"Being an expert isn't telling other people what you know. It's understanding what questions to ask, and flexibly applying your knowledge to the specific situation at hand. Being an expert means providing sensible, highly contextual direction." Jeff Atwood SEO Workers - Search Engine Optimization Consulting Company | SEO Analysis Tool | Webnauts Net SEO |
|
||||
|
Ah, must be my mistake .. pardon me. I have always done the laborious this page now goes to that page ... and I didn't have to? Apologies to Jean -Luc ...
I see my mistake ... I didn't read the post carefully ... m'bad. Now, if the page file names changed and the domain stayed the same I *would* need to do file name by file name, correct? I have never changed to a new domain, but I have changed file names when redesigning ... so in that case we do need to change http://domain.com/contact.html to http://domain.com/contact.php and http://domain.com/about-us.html to http://domain.com/about-us.php and so on???
__________________
M.-J. Taylor SEO Web Design by Cyber Key Search Smart DesignŽ SEO Copywriter & Traveling Vacation Gypsy Last edited by mjtaylor; 01-20-2008 at 03:19 PM. Reason: asking question |
|
|||
|
Hi mjtaylor,
There are plenty of different cases and sometimes you need to write a lot of rules. I am afraid Code:
RewriteEngine on RewriteRule ^(.*)\.html$ http://domain.com$1.php [L,R=301] |
|
||||
|
Excellent and thanks, Jean-Luc. So, the only time I would need to write a line for each file name is where the file names are different? For example, if
http://domain.com/page1.html is to change to http://domain.com/keyword1-keyword2.php and http://domain.com/page2.html is to change tohttp://domain.com/keyword1-keyword3.php ... or even http://domain.com/page1.html is to change to http://domain.com/keyword1-keyword2.html and so on? Thanks, MJ
__________________
M.-J. Taylor SEO Web Design by Cyber Key Search Smart DesignŽ SEO Copywriter & Traveling Vacation Gypsy |
|
|||
|
Quote:
to this site: Colorado Health Insurance Quotes and here is what is in my .htaccess file in the root of healthinsurance-colorado.com: Code:
RedirectPermanent / http://www.healthinsurancecolorado.net/
__________________
Health Insurance Colorado | Read about Shifting the burden of proof - "Argument from ignorance" Last edited by lukkyjay; 01-20-2008 at 08:44 PM. Reason: added the domain where the .htaccess was |
|
|||
|
This .htaccess file is valid. I just placed it on a test site and I got redirected. Did you place it in the same directory as the index.html of http://www.healthinsurance-colorado.com/ ?
Jean-Luc |
|
|||
|
Jean-Luc,
The websites that it wasn't working on were just some test sites I was using to see if it really worked (through godaddy). I went ahead and just used it on my real sites and it works beautifully. It was the same code that godaddy claimed was a "scripting error" Thanks! wige, If I used this: Code:
RedirectPermanent / http://www.newsite.com/
__________________
Health Insurance Colorado | Read about Shifting the burden of proof - "Argument from ignorance" |
|
||||
|
Well the solution seems to be pretty straightforward running on Apache.
But what if you are hosting on a Windows shared plan and do not have direct access to IIS? Do you have to create a script to be included on every page? We have done this for some other redirects, but not for moving an entire domain. thanks, Steven Alig
__________________
neighborhood websites for communities, associations,clubs & organizations |
|
||||
|
Quote:
Code:
<%@ Language=VBScript %> <% ' Permanent redirection Response.Status = "301 Moved Permanently" Response.AddHeader "Location", "http://www.yoursite.com/" Response.End %>
__________________
"Being an expert isn't telling other people what you know. It's understanding what questions to ask, and flexibly applying your knowledge to the specific situation at hand. Being an expert means providing sensible, highly contextual direction." Jeff Atwood SEO Workers - Search Engine Optimization Consulting Company | SEO Analysis Tool | Webnauts Net SEO |
|
|||
|
Didn't see if you got this resolved or not but you can give this a shot if not.
On the old server add this to .htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ^olddomain.com [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301] |
|
||||
|
Actually, my security comment was directed more toward the RewriteRule that Jean-Luc posted:
RewriteEngine on RewriteRule ^(.*)\.html$ http://domain.com$1.php [L,R=301] "RedirectPermanent", "Redirect 301" and "Redirect permanent" are all identical commands as far as Apache is concerned. The rewrite commands, however, are processed differently. These use an outside mod, and present additonal processing overhead, and some security issues have been identified in mod_rewrite which powers the Rewrite directives. Most webmasters and SEOs, however, seem more familiar with Rewrite because it is used to perform internal conversions on URLs to make them more search engine friendly. My concept was that if you are not already using mod_rewrite, you can avoid the extra overhead by using a RedirectMatch to accomplish the same task. The search engines don't care which method you use, because all of these methods cause the server to show the visitor the same end result. It typically comes down to the easiest method to implement, and the safest, depending on your other requirements. My first preference would be the Redirect options, and only using Rewrites if you already have them implemented for other uses on your server.
__________________
The best way to learn anything, is to question everything. |
|
|||
|
I am puzzled at this whole exercise.
Why is the site being renamed ? If you are just changing to a new hosting provider, it seems that the natural thing to do is to change DNS so that the existing URL sends you to the new site with no-one knowing that it is not the same site. If you are staying with the same provider, and the point is that you have bought a new domain name that you like better, then why move at all? Just point DNS for both names to the same IP address, and install a canonical rewrite to ensure that whatever name people used when they came in, it gets rewritten to the new name. No redirect involved. Am I misunderstanding the question, or am I missing something else? |
|
||||
|
Hi
You can read more about 301 redirect and its SEO advantage at : 301 Redirect and its SEO Advantage >> SEO HAWK << India You should also try to make your website technology independant by using urls as website/page rather than website/page.html or php This will help you migrate from one technology to another without worrying about extension of your web pages.
__________________
SEO Optimization Company - SEO Hawk - UK, US, Canada, and Australia SEO Optimisation UK | Latest SEO Blog on the Planet |
|
|||
|
Hi, I am also doing some redirects on my site and need a little help. I have a wordpress blog and installed a plugin called Redirection - Redirection - Manage 301 redirections without modifying Apache | Urban Giraffe
The plugin can use 'regular expressions', and since I have a lot of pages that need redirecting I thought 'regular expressions' would be the best way, but I don't know how to figure it out. Regular Expressions needed to change this kind of URL... /blog/2006/01/02/post-name to this... /blog/post-name and this /blog/images/logos/purchased-logos to this... /blog/images/logos/horse-logos |
|
||||
|
Quote:
/blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*) becomes /blog/$4 [0-9]{4} matches any group of 4 numbers, [0-9]{2} matches any group of two numbers, and .* matches any grouping of characters. Everything enclosed in () is assigned to a variable, so since the only part you are keeping is the fourth one, use $4 in the expression to use that value. For something that specific, you would use a literal translation, instead of a regex.
__________________
The best way to learn anything, is to question everything. |
|
|||
|
Thank you wige for the quick help on this! This saved me time from having to make a lot of redirects for each individual URL page.
|
|
|||
|
It's easy. Create a .htaccess file in the old domain:
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Keeping all links intact with 301 redirect | lukkyjay | Search Engine Optimization Forum | 6 | 01-11-2008 12:40 PM |
| Google has me back linked to fake pages? | Texlend | Google Discussion Forum | 6 | 09-11-2007 10:45 AM |
| Crawling non-linked pages? | activeco | Google Discussion Forum | 2 | 09-13-2004 03:01 AM |
| Keeping old pages, not visiting new pages | climaxphoto | Yahoo! Discussion Forum | 3 | 08-24-2004 02:26 AM |
| Keeping old pages, not visiting new pages | climaxphoto | Yahoo! Discussion Forum | 0 | 08-19-2004 06:50 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |