Upon installing Drupal and moving a site within the CMS, the information architecture and some of the URLs were changed. Is there any way to set up a re-direct from within the CMS? I've used to path aliases to make sure some really important pages don't get 404's, but that is far from the ideal solution.

What is the best way to tackle changed URLs (ideally through Drupal)?

Comments

biohabit’s picture

I know it is installed in CivicSpace and should be available in Drupal where you can go to ?q=admin/path and setup URL aliases that look something like ....

Alias System
10_2005_prep_group_meeting_notes node/298

And you can setup multiple alias for the same node #

ivank’s picture

Creating path aliasaes is helpful, but it's not the ideal solution, for the following reasons:

For example the file "/faqs" has moved to "/support/faqs/email.html"

The menu navigation block that appears when you're on the "/support/faqs" page is contingent on the path having following value: "support/*". Yes, I can add another rule to have the navigation block appear on the "/faqs" page as well, however, it also messes with the links in the menu being marked with class="active".

Also, I don't want my pages to take a duplicate-content penalty in the Google listings.

ivank’s picture

Effectively, what I was trying to figure out how to do was something that would act as a 301 redirect. For some reason, I didn't try pasting the header directives into the node body - which works just fine.

So, if path aliases aren't working out for you, and you have permanently renamed a resource (url), you can send a 301 header and redirect by creating a page with the following code in the body:

Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.absoluteurl.com/arbitrarypage.html" );

The above is PHP code.