[Zen Cart] Overwriting .htaccess entries

Magic SEO URLs for Zen Cart.
makenoiz
Posts: 6
Joined: Mon Mar 01, 2010 6:59 pm

[Zen Cart] Overwriting .htaccess entries

Postby makenoiz » Mon Mar 01, 2010 8:29 pm

One more for you. We have other rules that we need to add to the .htaccess file. How do we keep these from being rewritten in the .htaccess file ?

Thank you

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby inveo » Mon Mar 01, 2010 8:31 pm

Please read the FAQ section in manual for details how to protect your .htaccess file.

makenoiz
Posts: 6
Joined: Mon Mar 01, 2010 6:59 pm

Re: [Zen Cart] Overwriting .htaccess entries

Postby makenoiz » Mon Mar 01, 2010 10:36 pm

Hi I did read it however my problem is this (maybe I just dont understand the FAQs.)

I will need to regenerate the .htaccess regularly, however I have about 200 lines of custom .htaccess redirects as well. How can I rewrite to update for your program, yet retain my code on the .htaccess file? If its not possible, is there another solution that you are aware of. For instance, can I have 2 .htaccess type files somehow?

Thank you for your help.

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby inveo » Tue Mar 02, 2010 6:05 am

makenoiz wrote:I will need to regenerate the .htaccess regularly


Are you sure? .htaccess file needs to be generated only once during installation.

makenoiz
Posts: 6
Joined: Mon Mar 01, 2010 6:59 pm

Re: [Zen Cart] Overwriting .htaccess entries

Postby makenoiz » Wed Mar 03, 2010 7:44 pm

So if we add categories or sub categories and products, I will not need to regenerate the .htaccess file? We add/ remove categories and products daily.

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby inveo » Thu Mar 04, 2010 5:47 am

Yes.

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby BlessIsaacola » Fri Mar 26, 2010 11:56 pm

J- would you please kindly explain what this section of the .htaccess file is intended for and if this section can be safely removed. Thanks!

Code: Select all

#Working around additional parameter - this one can not be unset in some cases by Core
RewriteCond %{QUERY_STRING} ^(.*)&buy=now$
RewriteRule ^index.php$ index.php?%1 [L,R=301]
#Stopping Rewrite for Performance reasons (if you are using custom Rewrite Rules remove this line)
RewriteRule ^.*(\.php[0-9]{0,1}|\.htm|\.xml|\.css|\.js|\.jpg|\.gif|\.png)$ - [L]
http://www.clevershoppers.com - Where Clever People Shop!

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby inveo » Sat Mar 27, 2010 6:17 am

Every single line in .htaccess file is important. We hardly do not recommend to remove anything.

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby BlessIsaacola » Sat Mar 27, 2010 3:39 pm

~J~ wrote:Every single line in .htaccess file is important. We hardly do not recommend to remove anything.


But can you at least explain what those two lines are there for since you actually suggested removing the second one? We have 2 lines of custom rewrite rules in the .htaccess and I am not sure if that constitute enough reason to remove the one you suggested remove without knowing why they are there.

Thanks!
http://www.clevershoppers.com - Where Clever People Shop!

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

Re: [Zen Cart] Overwriting .htaccess entries

Postby inveo » Sat Mar 27, 2010 4:22 pm

First RewriteRule working-around a parameter which can not be "deleted" - for some reasons - by PHP engine. I can not tell you more because 1) I don't remember in detail and 2) it is a part of some Features which are not advertised (so it is much more hard for competitive products copy such feature).
The seconds RewriteRule is simple rule for stopping Rewrite Engine for request URIs which clearly does not require handling by Rewrite Rules.