i have a old url:
www.bookstore.com/cgi-bin/directory/sto ... nk&sku=P22
and i want to redirect (301) to:
www.bookstore.com/bookdetail/P22/title-of-book
(title-of-book is the name of book, is say, a new variable of my db).
(title-of-book is the name of book, is say, a new variable of my db).
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^[^/]*[^0-9]([0-9]+)/[^/]*[^0-9]([0-9]+)\.html$ /category.php?catid=$1&subcatid=$2 [QSA,L]
Like domain.com/categoryname/subcategoryname.html
The names is in the DB and change dynamically.
Therefore I need the .httaccess to be created with a MySql query dynamically.
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^[^/]+-([0-9]+)/[^/]+-([0-9]+)\.html$ /category.php?catid=$1&subcatid=$2 [QSA,L]
Users browsing this forum: Majestic-12 [Bot] and 7 guests