Posted by NikLP on January 17, 2007 at 1:12pm
I'm wondering if there would be a way to create a module that would do 301 redirects from static pages to Drupal pages.
That is, if I have a site constructed of old html pages, and I upgrade the client to Drupal, I am in theory faced with having to cut and paste the content from the old page into a node form of some sort. This is fine.
However, in order for the page rank of this old html page to be maintained, I need to point SEs to the new node rather than the old page.
Would it be possible to do this with a module?
Relating to this: http://drupal.org/node/16084
Comments
Import HTML
I can't help you with the 301 for static pages, I'm sorry, but as I read about "cut & paste" the old pages, do you know http://drupal.org/project/import_html ?
Edit: Do you have access to your .htaccess file?
Then why don't you use something like this:
Redirect 301 /folder/page.html http://www.domain.com/page
__
SEO Tips For Successful Drupal Sites
__
Cape Verde News & Community
My Info Collection
__
SEO Tips For Successful Drupal Sites
__
Cape Verde News & Community
My Info Collection
.htaccess and version control
If you are storing your Drupal install in a vcs, updating becomes a pain if you put the redirects into the .htaccess file.
On the other hand, using a .htaccess file is quite a bit faster than loading Drupal just to perform a redirect. ;)
pain?
Can you elaborate on why/how that is a pain? It seems fine to me.
--
Knaddisons Denver Life | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation
path redirect
The path redirect module will do this for you. After I've moved sites from static HTML (or another system or...) I like to watch my "page not found" errors for a few days and just create 301 redirects as necessary.
On larger sites with a more automated migration process you can create the 301 redirects in path redirect directly in the database table. I've used that system as well and it worked fine.
http://drupal.org/project/path_redirect
--
Knaddison Family | mmm Beta Burritos
knaddison blog | Morris Animal Foundation
Update:
FYI anyone who comes across this looking for tips...
globalredirect.module is now at 5.x-1.0 status but you need the dev version (which works fine in my experience)
path_redirect.module is now at 5.x-1.x-dev status - this works fine as far as I can see though
For people managing their own sites, John Forsythe posted this article earlier today, which may be of use to some.
Web Development in Nottingham, UK by Kineta Systems / Follow me on Twitter! @NikLP
thanks Path redirect works.
thanks Path redirect works. at first I thought it only redirected internal Drupal paths (because that's what the documentation says), but I tried a regular mypage.html path and it worked, thx!
Jason Graham
http://www.PolishYourImage.com
Path redirect with subdomains
Hey guys,
I am trying to redirect a subdomain but, doesn't let me do it with redirect on drupal 7, how can I redirect subdomains then?
Cheers!!
Try here:
Try here: http://codegrad.hub.ph/using-htaccess-301-redirect-in-subdomains/
--
My website.