Jump to content

SEO url - htaccess - riešenie problému s error 404


Guest

Recommended Posts

Zdravím užívateľov fóra.

Možno máte podobný problém ako ja. Týka sa súboru htaccess.txt, ktorý obsahuje v latest release chybný obsah. Mne osobne nefungoval. Pri zapnutých seo urls v admine (a slušne premenovanom .htaccess v roote aplikácie) po kliknutí na každú url píše chybu #404 - stránka nenájdená. Prikladám upravený obsah súboru .htaccess s opravou ...

# 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



...chýbali lomítka :)

Možno to niekomu pomôže. Videl som tu na fóre podobné dotazy s tou istou chyb. hláškou.

Pekný deň...

Tomanóczy Michal

Link to comment
Share on other sites

This should be the answer.

http://prestashop-godaddy.blogspot.com

It is in English, so I hope you can read it. Or just use Google translate.


No, this should be not the answer, because I didn't ask any question :) This is my solving of problem with seo urls. The file htaccess.txt or .htaccess (after rename) contains some errors (imho). Compare my version of htaccess and the version in the latest package that is available on this site. ;) In old version of htaccess missing slashes '/' .

Have a nice day.

Mike.
Link to comment
Share on other sites

Hm, to ale nevyzerá na chybu v htaccess :) . Predpokladám, že chyba je v systéme, ale nič podobné sa mi nestalo. Mne to fičí zatiaľ celkom fajn.

EDIT: Máš pravdu. Pri user-defined produktoch sa to správa tak, ako popisuješ. Skúsim nájsť chybu. Ak už niekto niečo podobné riešil, uvítam(e) jeho rady ;)

EDIT2: Takže v SVN verzii to bolo už opravené, ako mi do PM napísal Damien Metzger. Ide o súbor /classes/link.php . Prikladám prílohu...

Link.php

Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...
  • 2 weeks later...
  • 5 months later...
# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E]
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]
RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...