0

I've recently started doing way more Drupal development than Joomla!, and given I use my personal website as a testing platform that changes about once every few years, am trying to migrate it from Joomla! 1.5 to Drupal 7.

To this end, I've moved the entire Joomla! website to http://v3.aendrew.com and in doing so, broken all incoming links, which are now met with a Drupal install that's never heard about any of my prior content -- http://aendrew.com.

Is there any way I can do the following via Drupal 7?

  1. Detect broken incoming request (Drupal 404s)
  2. Check whether the path exists on the Joomla! subdomain.
  3. Issue a 301 redirect pointing to the Joomla! page if so; issue a 404 if not.

Thank you!

1 Answer 1

1

I would personally follow the steps described below:

1) Use this technique to detect the 404s and issue the redirect

2) Since you don't want to issue the redirect right away, but first check whether the URL exists in the Joomla! subdomain, you can use a function like this to determine whether the URL exists.

3) In order to determine what the URL of the incoming request was (so that you can use it to match it against the Joomla! subdomain), you can use this: $_SERVER['REDIRECT_URL']

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.