[Zen Cart] .htaccess re-generation

Magic SEO URLs for Zen Cart.
username1
Posts: 16
Joined: Sat Jun 21, 2008 3:16 am

[Zen Cart] .htaccess re-generation

Postby username1 » Sat Aug 08, 2009 2: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.

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

Re: [Zen Cart] .htaccess re-generation

Postby inveo » Sat Aug 08, 2009 5: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.

username1
Posts: 16
Joined: Sat Jun 21, 2008 3:16 am

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Sun Aug 09, 2009 11: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 :(

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

Re: [Zen Cart] .htaccess re-generation

Postby inveo » Sun Aug 09, 2009 12:01 pm

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...

username1
Posts: 16
Joined: Sat Jun 21, 2008 3:16 am

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Mon Aug 10, 2009 12:52 am

Hi, I use Ipswitch WSFTP, it allows you to change the file permissions or do you suggest another way?

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

Re: [Zen Cart] .htaccess re-generation

Postby inveo » Mon Aug 10, 2009 4:30 am

Is it shared or dedicated host? Can PHP scripts to write to files with such permissions?

username1
Posts: 16
Joined: Sat Jun 21, 2008 3:16 am

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Mon Aug 10, 2009 4: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 3:16 am

Re: [Zen Cart] .htaccess re-generation

Postby username1 » Mon Aug 10, 2009 7: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.