Remove php extension from URL on Windows hosting account using web.config

Posted by asprin on Stack Overflow See other posts from Stack Overflow or by asprin
Published on 2012-04-10T05:19:24Z Indexed on 2012/04/10 5:29 UTC
Read the original article Hit count: 148

Filed under:
|
|
|
|

I've searched before asking this question. The answered ones were related to Linux hosting account and the ones with Windows hosting account didn't match what I was looking for.

As you might have guessed, I've a Windows shared hosting account with godaddy. My aim was to remove the '.php' extension from the url. After researching I found that .htaccess would do exactly what I want. But I also found that .htaccess doesn't work in Windows environment and that I'll need a web.config file to do the same task.

Now I know there are modules through which the code can be generated, but the problem is I don't know how to get them installed on my hosting account. I don't want to go through the process of contacting the people over at godaddy and hence I'm looking to solve this on my own. What I'm looking for is a web.config equivalent of .htaccess

This is what I'm trying to achieve:

Current URL : www.abcdef.com/contact.php

Desired URL : www.abcdef.com/contact

Any help would be greatly appreciated.

Thanks, Nisar.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about url