Rewrite Rules for Zen Cart Mods

Custom URLs and redirections.
BlessIsaacola
Follower
Posts: 98
Joined: Sun Feb 03, 2008 9:48 pm
Location: Kennesaw, GA
Contact:

Re: Rewrite Rules for Zen Cart Mods

Postby BlessIsaacola » Tue Jul 01, 2008 7:01 pm

BTW, this code did not work to solve the problem described above:

Code: Select all

RewriteRule ^index.php?main_page=about_us$ about-us.html [R=301,L,QSA]
http://www.clevershoppers.com - Where Clever People Shop!

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: Rewrite Rules for Zen Cart Mods

Postby inveo » Mon Jul 14, 2008 10:33 am

You are correct. I hope this will work fine:

Code: Select all

RewriteCond ${QUERY_STRING} ^main_page=about_us$
RewriteRule ^index.php$ about-us.html? [R=301,L]

BlessIsaacola
Follower
Posts: 98
Joined: Sun Feb 03, 2008 9:48 pm
Location: Kennesaw, GA
Contact:

Re: Rewrite Rules for Zen Cart Mods

Postby BlessIsaacola » Wed Jul 16, 2008 8:36 am

Unfortunately, it did not work. You can click on this link: http://www.clevershoppers.com/index.php ... e=about_us and it will still take you to the non-formatted page instead of rewriting.
http://www.clevershoppers.com - Where Clever People Shop!

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: Rewrite Rules for Zen Cart Mods

Postby inveo » Wed Jul 16, 2008 8:38 am

Please make sure you put this code immediately after RewriteBase line.

BlessIsaacola
Follower
Posts: 98
Joined: Sun Feb 03, 2008 9:48 pm
Location: Kennesaw, GA
Contact:

Re: Rewrite Rules for Zen Cart Mods

Postby BlessIsaacola » Sun Jul 27, 2008 4:12 pm

Yes! That's exactly where it is located and it still doesn't work. Thanks!
http://www.clevershoppers.com - Where Clever People Shop!

sarah2472
Posts: 3
Joined: Mon Aug 11, 2008 4:41 pm

Re: Rewrite Rules for Zen Cart Mods

Postby sarah2472 » Mon Aug 11, 2008 4:44 pm

Actually... I'm editing this, because I stated it wrong in my last post, so I'm rephrasing it :)

I tried using:

RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3})&zenid=([a-z0-9]*)$ [OR]
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3})$ [OR]
RewriteCond %{QUERY_STRING} ^zenid=([a-z0-9]*)$ [OR]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^returns.html$ index.php?main_page=returns [L,QSA]


to rewrite the returns page. The rewrite works because you can access the page now from either URL. The problem is that it's not transforming the link in the information sidebox. It still links and goes to: https://www.ktpetsupply.com/index.php?main_page=returns

I would have thought it would automatically change like the others.

DoBBs
Posts: 1
Joined: Sat Oct 18, 2008 10:08 am

Re: Rewrite Rules for Zen Cart Mods

Postby DoBBs » Sat Oct 18, 2008 10:18 am

Hi,

I have installed Magic SEO and everything is working correctly. Since install I have added a Mod called Links Manager v3 (http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=297), which is not working, I believe because of URl rewriting. When I submit a link I get a 403 error (http://www.molliemoo.co.uk/index.php?main_page=links_submit&lPath=2).

I have read this forum and have used existing rules as a template, but have had no success. I have also tried using the About us example in this thread again without success.

Code: Select all

#links - links
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3})&zenid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3}) [OR]
RewriteCond %{QUERY_STRING} ^zenid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^
RewriteRule ^links.html$ index.php?main_page=links [L,QSA]
#links submit - links submit
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3})&zenid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3}) [OR]
RewriteCond %{QUERY_STRING} ^zenid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^
RewriteRule ^links_submit.html$ index.php?main_page=links_submit&lPath=2 [L,QSA]
#links submit 2 - links submit 2
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3})&zenid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^currency=([a-zA-Z]{3}) [OR]
RewriteCond %{QUERY_STRING} ^zenid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^
RewriteRule ^links_submit_success.html$ index.php?main_page=links_submit&action=send [L,QSA]


Is there something fundamental I am missing?

Any help is much appreciated.

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: Rewrite Rules for Zen Cart Mods

Postby inveo » Sat Oct 18, 2008 11:09 am

You don't need to add any Rules in this case. Problem you are experiencing is not caused by MSU, but by MOD (you can prove it by disabling MSU, i.e.: rename .htaccess and comment out installation line).