Url rewrite problem
Posted: Wed Mar 23, 2011 8:22 am
Hi
Im trying to write my urls as
product/product_name
rather than
product.php?productid=1
I have come across the apache way, mod_rewrite, and the php way, FilesMatch. But both have the same problem. my style sheet is in a folder in root called styles and images are in images folder and includes etc.
But when I use the url product/product_name, it is using the page product.php?productid=1 except now its looking in the product folder for the styles and images folder. also, none of the links work as again, its looking in the non-existent products folder. I dont really want to have absolute url's for everything. Is there a way around this problem?
Im trying to write my urls as
product/product_name
rather than
product.php?productid=1
I have come across the apache way, mod_rewrite, and the php way, FilesMatch. But both have the same problem. my style sheet is in a folder in root called styles and images are in images folder and includes etc.
But when I use the url product/product_name, it is using the page product.php?productid=1 except now its looking in the product folder for the styles and images folder. also, none of the links work as again, its looking in the non-existent products folder. I dont really want to have absolute url's for everything. Is there a way around this problem?