Please Help

New to mod_rewrite? This is a good place to start.

Please Help

Postby bkren » Tue Jun 30, 2009 7:43 pm

Here is the .htaccess file:


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^Products/?$ cart.php [NC]
RewriteRule ^[Ff][Ee][Aa][Tt][Uu][Rr][Ee][Dd].html?$ cart.php?m=featured
RewriteRule ^[Nn][Ee][Ww]_[Aa][Rr][Rr][Ii][Vv][Aa][Ll][Ss].html?$ cart.php?m=new_arrivals
RewriteRule ^[Ss][Pp][Ee][Cc][Ii][Aa][Ll][Ss].html?$ cart.php?m=on_sale
RewriteRule ^[Tt][Oo][Pp]_[Ss][Ee][Ll][Ll][Ee][Rr][Ss].html?$ cart.php?m=top_sellers
RewriteRule ^[Ss][Pp][Ll][Aa][Ss][Hh][-_][Pp][Aa][Gg][Ee].html?$ cart.php?m=splash
RewriteRule ^.*_v([\d]+)/?$ cart.php?m=product_vendor_list&v=$1
RewriteRule ^.*-v([\d]+)/?$ cart.php?m=product_vendor_list&v=$1
RewriteRule ^.*_v([0-9]+)/?$ cart.php?m=product_vendor_list&v=$1
RewriteRule ^.*-v([0-9]+)/?$ cart.php?m=product_vendor_list&v=$1
RewriteRule ^.*_c([\d]+)/?$ cart.php?m=product_list&c=$1
RewriteRule ^.*-c([\d]+)/?$ cart.php?m=product_list&c=$1
RewriteRule ^.*_c([0-9]+)/?$ cart.php?m=product_list&c=$1
RewriteRule ^.*-c([0-9]+)/?$ cart.php?m=product_list&c=$1
RewriteRule ^.*_p([\d]+).html?,?([\d])?,?([\d])?$ cart.php?m=product_detail&p=$1&special=$2&related=$3
RewriteRule ^.*-p([\d]+).html?,?([\d])?,?([\d])?$ cart.php?m=product_detail&p=$1&special=$2&related=$3
RewriteRule ^.*_p([0-9]+).html?,?([0-9])?,?([0-9])?$ cart.php?m=product_detail&p=$1&special=$2&related=$3
RewriteRule ^.*-p([0-9]+).html?,?([0-9])?,?([0-9])?$ cart.php?m=product_detail&p=$1&special=$2&related=$3
RewriteRule ^cart\.html?([^/]*)$ cart.php$1
RewriteRule ^([^/]+)\.html?$ cart.php?m=content&name=$1
RewriteRule ^items?/([\d]+)/?$ cart.php?m=product_detail&p=$1
RewriteRule ^products?/([\d]+)/?$ cart.php?m=product_detail&p=$1
RewriteRule ^[Pp]roducts.*/([^/]+)\.html?,?([\d])?,?([\d])?$ cart.php?m=mod_redirect&info=$1&special=$2&related=$3
RewriteCond %{HTTP_HOST} ^babyobaby.com
RewriteRule (.*) http://www.babyobaby.com/index.html [R=301,L]
</IfModule>


Here is the redirect

Redirect 301 /arquan/category.cfm/home-and-kennel http://www.petandkennelsupply.com/Kennel-Supplies-c10/

When I navigate to www.petandkennelsupply.com/store/home-and-kennel/

I get redirected to:

http://www.petandkennelsupply.com/cart. ... nd-kennel/



I expect to get redirected to:


http://www.petandkennelsupply.com/Kennel-Supplies-c10/

as is stated in the 301 redirect.

Any help is appreciated
bkren
 
Posts: 1
Joined: Tue Jun 30, 2009 7:23 pm

Postby richardk » Wed Jul 01, 2009 8:47 am

Redirect with mod_rewrite
Code: Select all
RewriteRule Redirect ^arquan/category\.cfm/home-and-kennel$ http://www.petandkennelsupply.com/Kennel-Supplies-c10/? [R=301,L]

add it after
Code: Select all
RewriteEngine On
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 104 guests

cron