# URL rewriting does not work on localhost

**URL:** <https://forum.kirupa.com/t/url-rewriting-does-not-work-on-localhost/289431>\
**Category:** programming\
**Created:** [May 30, 2009, 8:16am UTC](https://forum.kirupa.com/t/url-rewriting-does-not-work-on-localhost/289431 "2009-05-30T08:16:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalraj9](https://avatars.discourse-cdn.com/v4/letter/v/db5fbb/32.png) [@vishalraj9](https://forum.kirupa.com/u/vishalraj9)\
**Post date:** [May 30, 2009, 8:16am UTC](https://forum.kirupa.com/t/url-rewriting-does-not-work-on-localhost/289431/1 "2009-05-30T08:16:35Z")

</div>

Hi all,  
I am building a CMS website in PHP on my localhost and I have dynamic URLs, something on the lines of:

[www.mysite.com/index.php?page1=1&page2=2](http://www.mysite.com/index.php?page1=1&page2=2)

Now I was trying to get the links to display in Search Engine Friendly format, preferably something on the lines of:  
[www.mysite.com/index.html](http://www.mysite.com/index.html)

[www.mysite.com/about.html](http://www.mysite.com/about.html)  
[www.mysite.com/contact.html](http://www.mysite.com/contact.html)

I tried the Kirupa tutorial located on the following page, but it does not work:  
[www.kirupa.com/developer/php/clean\_url\_pg1.htm](http://www.kirupa.com/developer/php/clean_url_pg1.htm)

Apart from this, I even tried other searches from Google but none of them helped. As I am doing this on my localhost on my PC, I created a .htaccess file and placed the clean url code into it and placed the .htaccess file in the site root i.e. in “mydomain” folder, which in turn is located in “wamp” folder.

Hopefully someone would be able to help me through this as I have been seaching for an answer for a long time. Any help is highly appreciated.

Thank you in advance.
