Hi, I need to change the script i use in my site to a diferent one (in PHP). The problem is that im getting good SE traffic and i don't want to loose it from about 10.000 index pages. So what do you think i should do? Change the main folder from site.com to site.com/new-site/ ? Delete current site and insert new one? To keep it simple i would like to redirect users from all older urls to my new home page. With a 301 redirect will visitors get redirected to my new homepage? I played around with it but didnt work lol. So do you think its possible? How? Thanks
Yes, it is perfectly possible to redirect (301) all old pages to the new home page. It is not too difficult if the old URL's can be easily distinguished from the new ones. Jean-Luc
Yes, it is imperative that you use a 301 direct, as using javascript of 302 direct can get you in trouble with the search engines.
I would completely replace the old one. I have done this before without any bad effects on SE. I have redirected all urls to the new ones using a couple of regexp. Took a while to figure out, because regular expressions are hard to get right (for me), but worked nicely. Here is an example: RewriteRule ^(.*)\.html$ http://www.example.com/index.php?=$1 [R=301,L] This redirects all requests to file1.html to http://www.example.com/index.php?=file1 (or so I think, haven't tested it). You can do more intelligent things like removing all "/" before creating your query string and then redirecting again to make it look like static html (most urls of my photo website look like static html but are really dynamic) - make sure you don't built loops by accident. Its always a good idea to build a local test environment with xampp. Another example is my html cache (builds html files from php files and recreates them ever so often, then checks if the files are there, if yes serve html instead of php, html files are stored in the static folder, the whole process is not visible to the user): http://www.aguntherphotography.com/projects/webcache/implementation.htm The modrewrites could prob. be adapted for your case.
Read this article It gives examples of the code - none of them match what I want to do, but it might help you.
Yeah, I agree, using 302 redirects or meta redirects are likely to give you trouble and can even get you banned from the major search engines.
No way man. 302 = temporary redirect, 301 = permanent redirect. The 302 has been used to steal content, but has many perfectly legitamate uses (e.g. mainanance messages). I don't think you will ever have problems for using a 302 on your own website.
301 redirect is ok for SEO, i tried many sites, i can say PR is moving to the redirecting page w/o any loss <?php Permanent redirection header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.somacon.com/"); exit(); ?>
I read some posts today and it seems that there can be a minor loss if you have pr4 for example you can get only pr3 and so on