.htaccess file problems

Evening!

I am having a few problems with setting up the SEO Add On.

I can see the .htaccess file in my template editor in Admin.

When I go to change it to the correct code via the previous SEO Add On threads it gives me a file and directory permissions error and asks me to check those.

I have a 777 on the skins folder. But via my ftp I cannot even see the .htaccess file.

So my question is, how on earth do I get my SEO Add on going?

Thanks in advance

Paddy

What FTP program are you using? Check to see if there is a preference setting for something like “Show hidden files”.



Bob

Right, just refreshed and the .htaccess file is there and I can see it on my FTP, which is Cyberduck…

Create one and upload it.



I thought I read before that Mac users had problems seeing files that begin with “.”

[quote name=‘Tool Outfitters’]Create one and upload it.



I thought I read before that Mac users had problems seeing files that begin with “.”[/quote]



They do. “Show hidden files” &/or “Hide System Files” normally has these settings hidden.

There should be an .htaccess file for each directory. It sounds like you may be missing the .htaccess for the root store directory. If you uncompressed the distribution on your Mac before uploading it, you would have missed any files starting with “.” unless you had run a utility to show hidden files on your Mac.



You can paste the following into a new file and save it as .htaccess in your store’s root:

```php DirectoryIndex index.html index.php





RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is http://www.yourcompany.com/store/cart

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !.(png|gif|ico|swf|jpe?g|js|css)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



RewriteCond %{REQUEST_FILENAME} ./catalog/.

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteRule . index.php?sef_rewrite=1 [L,QSA]





```



Let us know if this works.



Bob

Thanks for the help on this, but this is where I become completley dumb!

Which package do I use to create the file?

and do I just copy and paste this in?

My Cart is within the Public_Html folder on the server.



DirectoryIndex index.html index.php





RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is [url]http://www.yourcompany.com/store/cart[/url]

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !.(png|gif|ico|swf|jpe?g|js|css)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



RewriteCond %{REQUEST_FILENAME} ./catalog/.

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



I use cPanel so I am not familiar with ftp but if you can create a file via ftp then yes, copy the above info into the file.

[quote name=‘DIZZYMOTHER’]Right, just refreshed and the .htaccess file is there and I can see it on my FTP, which is Cyberduck…[/QUOTE]

What text editor are you using? You can set Cyberduck to automatically open files by specifying this program on the “Editor” tab in your Cyberduck preferences. From there, you can paste the above in and then hit “save” and it should be automatically copied back.



Bob

mmm, managed to edit the file, but its still telling me the permissions need checking when I activate the seo add on, I then go back to the .htaccess and its empty?

What permissions are set on the .htaccess file? If they are set to 666, try 644 or vice versa.



Bob

ok, I’ve set the permissions to 666, tried but failed seo add on.

set the permission to 644 and failed.

My skins folder is set to 777? is that right?



I’ve now noticed I’ve got a .htaccess in my public html folder and one in my skins folder, very confused now…

[quote name=‘DIZZYMOTHER’]I’ve now noticed I’ve got a .htaccess in my public html folder and one in my skins folder, very confused now…[/QUOTE]

You will find an .htaccess in many of your folders - don’t worry about that. The one in the store root is the one that matters for the SEO addon.



Bob

Okay!!! Sucess, thank you all so much for your time on this!

I uninstalled the SEO Add On, and then reinstalled, bingo! it blomin’ worked!!!

Thanks again! I could drive myself mad with this cart, I’m just a designer!!!

Ta!

Paddy

Dizzymother you are amazing.

I have been toiling with this problem for hours and hours changing files, contacting server Etc Etc and in the end gave up on SEO and then you come up with a simple answer --uninstall and install



Never have i seen this mentioned in all the posts i’ve read.



Thanks again

Ok Its working so is there anything i need to do now.



Ive cleared the cache and submitted the seo site-map to Google.



I use froogle so have re-uploaded that (as the link are now different.)



Is there anything else I might have missed?

[quote name=‘DIZZYMOTHER’]Okay!!! Sucess, thank you all so much for your time on this!

I uninstalled the SEO Add On, and then reinstalled, bingo! it blomin’ worked!!!

Thanks again! I could drive myself mad with this cart, I’m just a designer!!!

Ta!

Paddy[/QUOTE]



That worked for me also. But another problem I’m noticing is that if you go back and change the product name the URL does not change from how it was originally entered. So this basically means you can’t go back and SEO optimize your product titles. So only by adding a new product name correctly initially will be reflected in the rewritten url format. Cloned products also have issues by adding “clone” to the end of the product name in the url.



Tested with 2.0.11 and 2.0.12

[quote name=‘bitmanx63’]That worked for me also. But another problem I’m noticing is that if you go back and change the product name the URL does not change from how it was originally entered. So this basically means you can’t go back and SEO optimize your product titles. So only by adding a new product name correctly initially will be reflected in the rewritten url format. Cloned products also have issues by adding “clone” to the end of the product name in the url.



Tested with 2.0.11 and 2.0.12[/QUOTE]



All you need to do is delete the SEO name and it will generate a new one when you save it.

You can clear all your SEO names by running the following SQL query:

UPDATE `cscart_seo_names` SET `name` = '' ;



Then visit your www.YOURDOMAIN.com and new SEO names will be generated for all your categories, products and pages.



If you only want to regenerate the SEO name for products only, use this query instead:

UPDATE `cscart_seo_names` SET `name` = '' WHERE `type` = `p` ;



Bob

[quote name=‘bitmanx63’]That worked for me also. But another problem I’m noticing is that if you go back and change the product name the URL does not change from how it was originally entered. So this basically means you can’t go back and SEO optimize your product titles. So only by adding a new product name correctly initially will be reflected in the rewritten url format. Cloned products also have issues by adding “clone” to the end of the product name in the url.



Tested with 2.0.11 and 2.0.12[/QUOTE]



The generated SEO product name is found under the tab “Addons” when editing product, and not on the default load page with “General” tab. So whenever you edit the product name, just go to “Addons” tab and clear the SEO name there, and it will be regenerated automatically with the updated product name the next time your site is loaded with that product.



(I’ve moved the SEO name field for products to be directly under the product name field in the General tab so I can remember to remove the old SEO name whenever I edit product name. But it involves direct hacking of tpl code.)