evo2010 0 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 Quote Link to post Share on other sites
justsomeguy 1,135 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/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.