evo2010 Posted October 6, 2011 Report Share Posted October 6, 2011 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 More sharing options...
justsomeguy Posted October 6, 2011 Report Share Posted October 6, 2011 .htaccess files are for Apache, not IIS. IIS uses web.config to hold those types of directives. http://learn.iis.net/page.aspx/557/translate-htaccess-content-to-iis-webconfig/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now