
December 3rd, 2011, 07:06 PM
|
|
Contributing User
|
|
Join Date: Mar 2009
Posts: 90
Time spent in forums: 1 Day 6 h 31 m 53 sec
Reputation Power: 5
|
|
|
mod_rewrite - Put the result of a SQL query into a .htaccess file?
Hi,
I have just been trying to use mod_rewrite to create SEO friendly URLs. Very new to it.
In an eCommerce store the product urls are:
Code:
site.com/products.php?id=1
I want to use:
Code:
site.com/product-id-1s-title-from-inside-the-database
You see ^ the SEO friendly URL is a string/record from the database, it's the title field for the product with an ID of 1.
Can/how I use a SQL query inside the .htaccess file to make the writing of the .htaccess file automated? Or can you not do that, and my only option is to hardcode in the SEO friendly URLs by hand?
There are over 1000 products you see.
I'd appreciate any advice you can offer.
Thanks very much.
|