Jump to content

301 Redirecting


Greenreader
 Share

Recommended Posts

Hello.

 

Since I installed your cart in my /shop directory to serve the shopping part of my website, I would like to redirect a few of the pages (Like the contact, TOS, Return, and Privacy) to the ones I already have. I tried using the .htaccess file in the main /shop directory, but it doesn't seam to work. (Note: .htaccess has always been confusing for me, so sorry if I made a simple error)

 

Here is the .htaccess code I added at the end:

"

RewriteEngine On
RewriteRule http://domain.com/shop/contact-us http://domain.com/contact [R=301,L]

"

 

OR

 

"

Redirect 301 /contact-us ../contact

"

 

Neither works. Any help would be appreciated.

Thanks!

Link to comment
Share on other sites

Welcome Greenreader! Glad to see you made it to the forums.

CubeCart itself has a couple of methods of redirecting that does not involve the .htaccess file.

The first is that for Site Documents (Homepage, T&C, Privacy, et al), the Add/Edit screen, General tab, has a text field that, if a URL is entered here, CubeCart will direct the browser to go there instead of displaying the internal content (Content tab). The following selector determines whether the browser should show this alternate content in the same window or open a new window.

This is not a solution to the Contact Us form page. But, you can disable the internal Contact Us form, create a Site Document named Contact Us, and have it point to an alternate URL. (I will need to check if having a Site Doc with the same name as the Contact Us form would confuse CubeCart.)

(The second is for the scenario where you want an obsolete friendly path to point to the newer, current, CubeCart recognized friendly path. For example:
FROM: test-category/test-product
TO: test-category/test-sub-category/test-product

So, this is not a solution for your task.)

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...