Hello, hope someone can help me out.
I have an htaccess files which handles friendly url and some other rewrite rules.
To be specific, this is what the htaccess file does:
domain.com to www.domain.com
buy-product.html instead of productpage.php?productname=myproduct
I need to do https to http, the problem is on this case: : [
example.com...] to http://www.example.com/buy-product.html
When the redirect is done, it is done in this way:
http://www.example.com/productpage.php?productname=myproduct
If I do example.com to www.example.com I can keep the buy-product.html portion.
Here is my htaccess code, I really hope you can help me out.
I am using Helicon Ape under IIS7
# Helicon Ape version 3.0.0.76
rewriteengine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
rewriterule ^buy-([^/]*)\.html productpage.php?productname=$1 [L]
rewriterule ^allproducts-(.*)\.html$ products.php?beginstring=$1&category=$2
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)/(.*)\ HTTP/ [NC]
RewriteRule ^.*$ http:
//%{SERVER_NAME}/%1/%2 [R=301,L]
errorDocument 404 /404.cfm
[edited by: incrediBILL at 7:13 am (utc) on May 25, 2012]
[edit reason] dupe threads fixed [/edit]