ebuilt my site with drupal and clean urls along with pathauto etc

Old urls were something like http://www.animeomnitude.com/?page=c...ch/johnnybosch. However now, when someone clicks that from a search engine it goes to my main page rather than http://www.animeomnitude.com/intervi...osch-interview

What kinda redirect can I set up so /?page=* goes to the most related page to the keywords?

Comments

adamus_maximus’s picture

I've only been Drupaling a month now, but I think I have your answer.

Try using module "customerror", along with "search404". You can assign specific redirects in the "redirects" section.

/node/old1 /node/new1
/node/old2 /node/new2

If none of your configured redirects match, it'll run your chunk of PHP code instead. In that chunk, you can run more complicated logic as to where to redirect to, or what message to display, or what links to display. If after all that you still can't figure out where to send them, you can send them to the search404 page with

if (isset($_REQUEST['destination'])) {
  unset($_REQUEST['destination']);
} 
if (isset($_REQUEST['edit']['destination'])) {
  unset($_REQUEST['edit']['destination']);
}
drupal_goto(search404, drupal_get_destination());

Good luck

zyxware’s picture

Priority: Major » Minor
Status: Active » Closed (works as designed)

Closing issue