Forum Moderators: phranque

Message Too Old, No Replies

Redirect 301 all files on one folder to another folder

         

jmedia

6:50 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



I have a shopping cart on /store/ and one on /cart/

The first is newer. I'd like to have all the traffic going to all the files on /cart/ redirected permanently to /store/

I tried:
Redirect 301 /cart [foobar.com...]

That works only for url [foobar.com...] but not for all the other urls like [foobar.com...]

I have this option working fine:
RedirectMatch (.*)\.html$ [foobar.com...]

BUT,

if I do
RedirectMatch /cart/(.*)\.html$ [foobar.com...]
then it's not working.

The interesting fact is that the SE have indexed the pages like foobar.com/cart/page.html but clicking the link the address bar shows [foobar.com...]

That's due to the fact that the shopping cart is built using frames.

Should I rewrite the actual urls that appear on the address bar?
Can somebody help with this?

I just want all the requests for any pages on the /cart/ folder to be permanently redirected to the root of the /store/ folder (the home page of the shopping cart).

sitz

10:40 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



Redirect 301 /cart [foobar.com...]

This syntax works for me; per the documentation [httpd.apache.org], requests for paths under the redirected path are mapped on to the target of the Redirect directive. Or do you have other directives for the sub-paths which are overriding that behavior?