Jump to content

How To Hide .asp File Extensions


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...