[Zen Cart] .htaccess re-generation

Technical difficulties? Ask for help here.

[Zen Cart] .htaccess re-generation

Postby username1 » Sat Aug 08, 2009 1:16 pm

Hi Jiri

I need to auto generate the .htaccess file as I have mod rewrite installed now instead of isapi and have set the category levels to 5.

When I had the trouble initally you said to make sure that the file is writable by php scripts. Did you just mean chmod the value to 777? As the script still doesnt seem to generate when the .htaccess file permissions are changed to 666 or 777.

I dont want to just have to get you to ftp to the account everytime. Please tell me how I can do it myself.
username1
 
Posts: 16
Joined: Sat Jun 21, 2008 2:16 am

Re: [Zen Cart] .htaccess re-generation

Postby ~J~ » Sat Aug 08, 2009 4:29 pm

  1. Change the permissions on www/.htaccess to be writeable by all (666 or -rw-rw-rw- within your FTP Client) and delete readonly-htaccess file if exists on your FTP.
  2. Using your web browser visit the location you placed your internet shopping cart, e.g. http://www.mydomain.com/store/, http://www.mydomain.com/catalog/ etc. (by doing so the content of www/.htaccess file will be re-generated).
  3. Change the permissions on www/.htaccess to be writeable only by yourself (644 or -rw-r--r-- within your FTP Client) and/or create new blank file with readonly-htaccess name in same directory (this will prevent www/.htaccess file from being overwritten by Inveo Magic SEO URLs).
  4. The re-generation of .htaccess file content is finished.
Magic SEO URLs are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
InveoStore.com Founder
 
Posts: 1056
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Sun Aug 09, 2009 10:34 am

1. Change the permissions on www/.htaccess to be writeable by all (666 or -rw-rw-rw- within your FTP Client) and delete readonly-htaccess file if exists on your FTP.


I chmod .htaccess to 666, and can confirm that there is no readonly-htaccess on the server

2. Using your web browser visit the location you placed your internet shopping cart, e.g. http://www.mydomain.com/store/, http://www.mydomain.com/catalog/ etc. (by doing so the content of www/.htaccess file will be re-generated).


I visit a few of the catalog pages, and I get a 404 error as the rewrites are not generated in the .htaccess file but obviously the magic_seo.php is trying to use the rewritten URLs. Is there something I should be aware of with windows? What am I missing? I feel gutted as this should be so simple :(
username1
 
Posts: 16
Joined: Sat Jun 21, 2008 2:16 am

Re: [Zen Cart] .htaccess re-generation

Postby ~J~ » Sun Aug 09, 2009 11:01 am

username1 wrote:I chmod .htaccess to 666, and can confirm that there is no readonly-htaccess on the server


chmod? If I remember correctly you are running MSU over IIS...
Magic SEO URLs are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
InveoStore.com Founder
 
Posts: 1056
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Sun Aug 09, 2009 11:52 pm

Hi, I use Ipswitch WSFTP, it allows you to change the file permissions or do you suggest another way?
username1
 
Posts: 16
Joined: Sat Jun 21, 2008 2:16 am

Re: [Zen Cart] .htaccess re-generation

Postby ~J~ » Mon Aug 10, 2009 3:30 am

Is it shared or dedicated host? Can PHP scripts to write to files with such permissions?
Magic SEO URLs are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
InveoStore.com Founder
 
Posts: 1056
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Mon Aug 10, 2009 3:56 am

Hi, to answer your questions
Is it shared or dedicated host?

It is dedicated I have full control

Can PHP scripts to write to files with such permissions?

I would assume not, but how can I tell and rectify any potential problem?
username1
 
Posts: 16
Joined: Sat Jun 21, 2008 2:16 am

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Mon Aug 10, 2009 6:06 am

I managed to sort it finally on my own. In case anybody else ever has the same issue here is how to change the file permission on Windows 2003 with IIS

1. Navigate to the file or folder that needs its permissions changed.
2. Right-click on the file or folder and click on Properties.
3. Select the Security tab.
4. Click on the Internet Guest Account and make sure that the Allow checkbox is set for Write permissions.
5. If you are changing these permissions for the Drupal install process, when the installation is complete, for security reasons, you should revoke write permissions on the files or folders that Drupal no longer needs to write to.
6. To revoke write permissions, just uncheck it.
username1
 
Posts: 16
Joined: Sat Jun 21, 2008 2:16 am


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 5 guests