Forum Moderators: phranque
I would like to know whether or not it is possible to use modrewrite on urls on localhost in order to make them more seo friendly?
OR
Have I got to wait for the website to be launched and then use modrewrite to seo the urls?
btw, I have never previously used modrewrite or launched a website and have urls which have .php extensions and contain parameters.
Note: I have been reading up on this website for the last 3 months whilst constructing my website using php and mysql.
Thanx for the help in advance.
[edited by: Dilly at 2:39 pm (utc) on Sep. 11, 2007]
The answer to whether you can rewrite the URLs before going to a live server hinges on whether or not you have Apache installed on your localhost. If you do, then you can deploy and fully test the friendly-URLs solution. If you don't then testing would be difficult at best.
Jim
I do have apache installed on localhost so I guess I need to start using modrewrite now.
I have been doing some digging and found this great modrewrite post(tutorial) by you. Jd's Post [webmasterworld.com]
Just had one question.
I understand that I would need all the links in my php pages to point to the new friendly urls and can use preg_replace to do this.
can you give me an example of how i can use preg_replace for a link such as:
<?php
echo"<a href=\"make.php?id=$id&modelname=$name\">$name</a>";
?>
to be changed to..
<?php
echo"<a href=\"make/$name-$id.html\">$name</a>";
?>
Thanx jdMorgan you have been a great help to me.
[edited by: Dilly at 4:53 pm (utc) on Sep. 11, 2007]