Dear friends, I am a PHP web developer. I am using Windows XP (SP-2) and XAMPP 1.7.4 web server as my local host. Please tell me the steps how can I use .htaccess url rewriting. That mean how I make it working? No need url rewrite codes inside .htaccess file, just need it working in my pc's localhost. It may need editing "conf/httpd.conf"...... Please help. Thanks
Found something that might help you http://www.lancelhoff.com/enabling-htaccess-in-apache-on-windows/ Code (markup):
GMF, thanks for your url. I did the same thing and it may be working because I download a full site form live online server with htaccess file and placed all files to my localhost and url rewriting working here. When I move my cursor on a dynamic link it shows a friendly url in the status bar and also when I click the link it goes to friendly url. So i am sure url rewriting working. But I made a site and placed it to localhost. but the url rewriting not working. Do I need to add any code in my PHP files? Suppose, my link is: http://localhost/mysite3/pages.php?name=terms I want like bellow: http://localhost/mysite3/page/terms What will be the url rewriting code?
I think the code would look like this RewriteEngine On RewriteRule ^mysite3/pages/terms$ /mysite3/pages.php?name=terms [L] Code (markup): Just create a file with the name ".htaccess" and paste the code into it.
GMF, Here is my very simple 2 page test site. Would you please make it user friendly by url rewriting? View attachment site3.zip I placed it in my localhost and the ugly url looks like bellow: http://localhost/site3/program.php?action=event&sp=50 But I like the bellow: http://localhost/site3/prog/event/50 Please download the file (less than 1 kb) and place in your localhost and use the htaccess file, then send me back. I will be very great full to you. I spent my whole day today but cant solve this problem myself. Thank you