Redirecting all the pages with the same extention using .htaccess

Discussion in 'Apache' started by mike10, Mar 14, 2010.

  1. #1
    Hello,

    I am changing the structure of my entire site. I used to be on a windows server, but I am moving to a linux server. I have about 100 pages with a .asp extention and I am renaming them with the samepage name, but without an extention. So http://www.mysite.com/page1.asp now becomes http://www.mysite.com/page1/. Instead of including 100 lines of redirects in such as "redirect 301 /page1.asp /page/, I am wondeing of there's a command that will tell the server to 301 redirect all files with a ".asp" extention to the the same file name but with a "/" instead of ".asp"?

    Thank you in advance.

    Regards,
    Mike
     
    mike10, Mar 14, 2010 IP