Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
redirect 301 /luk_muk-11087.html http://www.angelshark.co.uk/luk-muk-11087.htm
RewriteRule ^([^/]+)-1([0-9]{1})([0-9]{3}).html$ /test.php?id_lang=$2&id_property=$3 -----8<--------------
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
redirect 301 /luk_muk-11087.html http://www.angelshark.co.uk/luk-muk-11087.html?
RewriteRule ^([^/]+)-1([0-9]{1})([0-9]{3}).html$ /test.php?id_lang=$2&id_property=$3 [L]
-----8<-------------- -----8<--------------
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^luk-muk-11087\.html\?$ http://www.angelshark.co.uk/luk-muk-11087.html? [R=301,L]
RewriteRule ^([^/]+)-1([0-9]{1})([0-9]{3}).html$ /accommodation/accommoDetails.php?id_lang=$2&id_property=$3 [NC,L]
-----8<--------------
# Externally redirect to remove query strings from hyphenated URLs that resulted from the previously-incorrect .htaccess code
RewriteCond %{QUERY_STRING} ^.
RewriteRule ^luk-muk-(1[0-9]{4})\.html$ http://www.angelshark.co.uk/luk-muk-$1.html? [R=301,L]
#
# Externally redirect to change old underscored URLs to new hyphenated URLs
RewriteRule ^luk_muk-(1[0-9]{4})\.html$ http://www.angelshark.co.uk/luk-muk-$1.html [R=301,L]
#
# Internally rewrite new SEO-friendly hyphenated URLs to script filepath with query parameters
RewriteRule ^(.+)-1([0-9])([0-9]{3})\.html$ /accommodation/accommoDetails.php?id_lang=$2&id_property=$3 [L]