Forum Moderators: coopster
The problem:
I was asked to rework a website that was done entirely in static HTML (500+ pages), with no standardized naming convention among the files. In order words I couldn't employ a regex redirect along the lines of
RedirectMatch product_(.*).html http://example.com/products.php?id=$1
The solution:
Rather than stuff 500+ Redirect lines in .htaccess, I just had it redirect all *.html requests to a PHP script that accepted checks the URL, and passes it on from there.
The question:
.htaccess causes a 301 redirect to the PHP script. The PHP script causes a 301 redirect to the file in question, or a 404. If a spider accesses somepage.html, and gets redirected twice (301s), will it still recognize that the new location is the final destination, or will is capture the PHP script as the new permanent location of the HTML file?
Thank you for your help
T
[edited by: pageoneresults at 6:38 pm (utc) on Aug. 3, 2005]
[edit reason] Examplified URI Reference [/edit]
If you can redirect the html and get results or a redirect out of the php, then you should be able to use the power and flexibility of mod_rewrite to serve the php to the old static html URL's and, based on the information that you get from the URLs (which you must be using in some way to redirect now) server the information from the php file...
RewriteEngine ON
RewriteRule ([^.]+)\.html /index.php?info=$1 [L]
Will pass the information from the php to the html 'silently' based on the page name, no redirect involved. Basically, you are 'updating' the information on the page from the php file, but not changing the URL.
I would be happy to help you work through a more detailed solution in the Apache forum. =)
(This is how I serve *all* of my php information...)
Justin
Added: More directly addressing the SEO impacts, the age of a site appears to be determined not only on the lenght of registration of a domain, but also by how long SE's have know about URLs, percentage of new vs old aged URLs, so basically when doing bulk URL changes, you are 'creating' a new site, even though the domain is aged - As in all things, your results may vary.
As for it being entered as a new url, IMO that is <wrong>. If you give 301 redirects, your "old" urls will be replaced with the new location. You google rankings and/or indexed links may drop for about 2-4 weeks, but after that you should bounce back to where you were before with both indexing and PR.
Compare this to if you did not do 301 redirects (but just did a normal redirect), in which case they would be added as "new" URLs, you'd maybe be penalized for duplicate content, and it would take 6 months - 1 year to get your "new" urls PR and indexing back up to where your "old" urls were.
[edited by: jatar_k at 1:55 am (utc) on Aug. 4, 2005]
5. The method of claim 2, wherein the inception date corresponding to the document is based on at least one of a date when a search engine first discovers the document, a date when a search engine first discovers a link to the document, and a date when the document includes at least a predetermined number of pages.
Yeah, I just made that up off the patent application...
I was advising him to serve the information to the old URL's as changed content, not as new, redirected to URL's and content.
Check the Google forum threads for those who wish they had not changed URL's on their site... Or, maybe even the W3C 'cool URL's don't change' quote would help.
Done with this thread.
Justin
[edited by: jatar_k at 1:56 am (utc) on Aug. 4, 2005]