Jump to content

[Solution] - Friendly URL not working


Recommended Posts

I havent found a satisfying solution of this problem using search. But ive discovered a new one. If it will be helpful to you u can visit my pages http://www.hanspaulska-liga.cz as a gesture of thanks.

If u have already tried this manual:
http://www.prestashop.com/wiki/External_or_Friendly_URLs/

Then edit .htaccess, final version should look like this.
(the only difference between the original one and this one are "slashes" before file names)

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 3 months later...

Thank you.

It shows blank page, but if I enter 'www.mydomain.com/qwerty' it opens store page 'page no longer in use.....' and from this point I can navigate and see friendly links in my store, but if I press 'HOME' it goes to the blank page again :(

Link to comment
Share on other sites

Hi,

I have followed all the procedures I have found so far and none of them worked.

The page before the friendly URL activation looked something like this:
http://localhost/prestashop/category.php?id_category=3

After activating (checked Apache, PHP, htaccess, etc) it looks like this:
http://localhost/prestashop/3-extreme

And it gives me the "404 not found"
"extreme" is the friendly name I want to give, but what is that "3" doing there?

Link to comment
Share on other sites

Unfortunately I am having the same problem. Do I have to have Friendly URL's turned on before importing my products? In other words are the people who it is working for, the ones who had Friendly URL's on at the time the products were first made? Any help is appreciated.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

the version below is if your site is just www.mysite.com (note the / slash before filenames)

AddType x-mapp-php5 .php

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php

If your store is in a subfolder www.mydomain.com/subfolder, then your .htaccess needs the / and also the subfolder name.
so rewrite rules must contain the folder in the prefix as sample 1 line below

RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$1 [QSA,L,E]

you will see where I had to add the subfolder name /prestashop/ to the line.
(remember this is only 1 sample line)

also make sure you have php 5 activated if it needs it



John

Link to comment
Share on other sites

Torchia which version are you using, paste your .htaccess here

also just a quick note, the new prstashop has a button which you click to generate a .htaccess file. if you are using localhost you can download this, then generate the .htaccess file and use that one...jusr remember if you then change to www.site/subfolder you will still have to add the subfolder.

John

Link to comment
Share on other sites

×
×
  • Create New...