I recently upgraded a website from aspx to a drupal site. I never 310'd 301'd the old pages which are gone.

The old aspx pages are still showing up as 404 error in google webmaster. I have created a new site map for the drupal site when it was launched 2 months ago, and then again recently.

Can I create a 410 redirect in the htaccess for all aspx pages like a wildcard? If so how can I do this? thanks in advance

  • What webserver are you using? – MrWhite Jan 16 '13 at 0:05

You cannot set 410 Gone as redirect, which indicates that the web server has no forwarding address for the URL and the browsers would treat it as error. You should use 301 Move Permanently instead, using below line in .htaccess would redirect like wildcat to newsite.com

  Redirect 301 / http://newsite.com/
  • HI so Redirect 301 is essentially the old asp pages, redirecting to the same domain which now hosts the drupal site? – tiki16 Jan 15 '13 at 19:34
  • Presumably the newsite is still hosted on the same domain? In which case you can't simply Redirect all files to the "newsite" quite in this way. – MrWhite Jan 16 '13 at 1:01
  • 1
    RedirectMatch .*\.asp$ / would redirect all .asp pages to the root of your site in the same domain – neo Jan 16 '13 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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