Jump to content

How To Hide .asp File Extensions


evo2010
 Share

Recommended Posts

Hi Im hoping someone can help me. I have an asp site hosted on a windows shared hosting account. I want to have it set up so that if a user types a url address with or without the file extension then the page still shows. EG: www.mywebsite.com/about-us will bring up the www.mywebsite.com/about-us.asp page (but without showing the .asp bit) I was told I needed a .htaccess file and to include the following: RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}\.asp -fRewriteRule ^(.*)$ $1.asp I loaded this up but nothing, if I type www.mywebsite.com/about-us I get "The page cannot be found HTTP Error 404" page: The website has many pages so I wouldnt want to have to do something that changes it page by page. Anyone have any ideas on what I could be doing wrong or what I could try? I am fairly new to all this so I would appreciate any help - preferably in simple terms! :) Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...