Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

share|improve this question
    
What webserver are you using? –  w3d Jan 16 '13 at 0:05
add comment

1 Answer 1

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/
share|improve this answer
    
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. –  w3d 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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