driveflexfuel
New Member
- Messages
- 159
- Reaction score
- 0
- Points
- 0
This is an example of our old dynaimc product URL:
http://www.site.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=cm028-ak47-airsoft&Category_Code=&Store_Code=R
we are now using static pages
We need htaccess to reconize the product code which is cm028-ak47-airsoft then smiply redirct with 301 to the new static page which is http://www.site.com/cm028-ak47-airsoft.html
any help is greatly appreciated
Is this something that can be edited to work
# Enable mod_rewrite, start rewrite engine
Options +FollowSymLinks
RewriteEngine on
#
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ /index.php?product=$1&color=$2&size=$3&texture=$4&maker=$5 [L]
#
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?product=([^&]+)&color=([^&]+)&size=([^&]+)&texture=([^&]+)&maker=([^\ ]+)\ HTTP/
RewriteRule ^index\.php$ http://example.com/product/%1/%2/%3/%4/%5? [R=301,L]
http://www.site.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=cm028-ak47-airsoft&Category_Code=&Store_Code=R
we are now using static pages
We need htaccess to reconize the product code which is cm028-ak47-airsoft then smiply redirct with 301 to the new static page which is http://www.site.com/cm028-ak47-airsoft.html
any help is greatly appreciated
Is this something that can be edited to work
# Enable mod_rewrite, start rewrite engine
Options +FollowSymLinks
RewriteEngine on
#
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ /index.php?product=$1&color=$2&size=$3&texture=$4&maker=$5 [L]
#
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?product=([^&]+)&color=([^&]+)&size=([^&]+)&texture=([^&]+)&maker=([^\ ]+)\ HTTP/
RewriteRule ^index\.php$ http://example.com/product/%1/%2/%3/%4/%5? [R=301,L]
Last edited: