By venkat-rk on
Just re-designed a static site in drupal. Google has indexed a number of pages that I am now trying to redirect as 301. But, if I put the following into drupal's .htaccess file, I am getting an internal server errror:
RewriteRule ^news\.html /news [R=301]
RewriteRule ^recognition\.html /recognition [R=301]
RewriteRule ^overview\.html /about [R=301]
RewriteRule ^people\.html /about/people [R=301]Thanks in advance.
Comments
Path Redirect
Use Path Redirect instead - http://drupal.org/project/path_redirect
Unless I am mistaken,
Updated: Unless I am mistaken, path_redirect is for redirecting one drupal path to another path or an external path, not an old html path to a current drupal path.
Path Redirect can be used to
Path Redirect can be used to redirect static aliases to a Drupal path. I use it every time I convert a static site.
Hmm...that's strange. You're
Hmm...that's strange. You're right. I don't know if I was looking at some other module, but I seemed to recollect that the last time I tried it, the 'from' and 'to' paths were both drupal paths. Thanks for the tip.
So, do you enter the news.html in the url redirect field on the node edit form for a page that is now at www/domain.com/news in drupal? And, so on?
You're talking about two
You're talking about two different things. Path Redirect fields are at Site Building > URL Redirects. Add "news.html" to the From field and "news" to the To field.
The Path alias field (from the Drupal Path module) is on the node edit form. That's where you would alais the URL to news instead of node/123.
You're talking about two
That's exactly the screen I saw before and it didn't seem to work. But, following your instruction, I was able to add the redirect. The mistake I was making was to enter the full drupal path in the 'To' field. Thanks for the help.
I don't know if this is a new feature of the module, but enabling the module now adds a 'url redirect' setting to every node edit form.
Not a new feature but I see
Not a new feature but I see now how URL redirects can be confusing :)
Facing a problem with
Facing a problem with redirecting a path. The old path is partners.html and the new drupal path is www.domain.com/network/partners.
When I enter 'network/partners' in the 'To' field, the module is reporting it as an invalid path.
Do you get something like
Do you get something like more than 20 redirection error? What is your internal error?
--------------------------------------------------------
Dipen Chaudhary
www.dipenchaudhary.com
--------------------------------------------------------
Dipen Chaudhary
www.qed42.com ( Drupal development services specialize in social networks and other user generated content platforms )
www.dipenchaudhary.com
I am getting an Internal
I am getting an Internal Server error 500. I thought it was to do with the permissions of .htaccess, which drupal sets at 644 and has to be changed to add the redirect code, but changing it back to 644 didn't help as long as the redirect code was in the file. As soon as I went back to the default .htaccess that ships with drupal, the problem vanished.
what does ur apache error
what does ur apache error log say about that 500 error?
--------------------------------------------------------
Dipen Chaudhary
www.dipenchaudhary.com
www.playdrupal.com
--------------------------------------------------------
Dipen Chaudhary
www.qed42.com ( Drupal development services specialize in social networks and other user generated content platforms )
www.dipenchaudhary.com
I didn't check the apache
I didn't check the apache log yet. I got the path redirect module working thanks to jt_jones here.
Hello Dipen, This is what
Hello Dipen,
This is what the apache error log says:
RewriteRule: bad flag delimitersWeird. I have lines like
Weird.
I have lines like this in one of my sites that work fine:
RewriteRule ^contact.php$ http://www.example.com/contact [R=301,L]
Yeah, it's a bit weird. I
Yeah, it's a bit weird. I used a similar method for another static site that was moved to drupal and it worked fine for that site.
joachim, where exactly did
joachim, where exactly did you place these rewrite rules in drupal's .htaccess file?
Just above the big chunk of
Just above the big chunk of rewrite "old-style urls".
Funny. That's exactly where
Funny. That's exactly where I put them too and got the internal server error. May be I need to check the apache log as dipen pointed out.
I too am redoing static site
I too am redoing static site to Drupal. I have used the redirect module to change my old static pages Static-Page.html to static-page
Altered uppercase and removed html and Google Analytics shows similar page views and visitors. These pages are indexed by Google too.
If you're interested http://www.digitalmania-online.com
You will see a combination of old static pages and new drupal pages all visible from a Kludged menu system.
301 will not convert static pages to Drupal
Hi,
301 will not convert static pages to Drupal. With that, you are going to get the earlier HTML pages and the old site.
Instead, copy the HTML code and paste it into your Drupal site and set the input format to Full HTML.
Best wishes,
JK
PS: If you are using a contrib module to do the path rederct, please disable clean path.
Should work now.
JK
Hmm...I am not sure the
Hmm...I am not sure the redirect is for converting static pages to drupal nor is there any need for copying the HTML code etc.
When search engine bots come crawling, the 301 status tells them that the old page has been permanently moved to the new location. This is what the path redirect module seems to do automatically.
I've had good success using
I've had good success using this method:
Hi again,Nice to here that.
Hi again,
Nice to here that.
JK