Prestashop friendly url problems (SOLVED)
Added by danimx17 almost 14 years ago
Hello, my name is Dani,
Since a few weeks ago I decided to leave a little from side to Apache and lighttpd take for all my web projects (I'm web developer). I found a little problem using the application prestashop is that although I get the friendly url of the products work, I can not work properly those fixed url for example the contact form it uses canonical url.
Currently my settings file. conf is:
$HTTP["host"] =~ "(^|\.)xboxaccesorios\.com$" { server.document-root = "/var/www/vhosts/xboxaccesorios.com/httpdocs" server.errorlog = "/var/www/vhosts/xboxaccesorios.com/logs/error.log" accesslog.filename = "/var/www/vhosts/xboxaccesorios.com/logs/access.log" server.error-handler-404 = "/e404.php" url.rewrite-once = ( "^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$" => "/img/p/$1-$2$3.jpg", "^/([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$" => "/img/c/$1$2.jpg", "^/lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" => "/product.php?id_product=$3&isolang;=$1$6"$ "^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" =>"/product.php?id_product=$2&isolang;=$1&$4", "^/lang-([a-z]{2})/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/cms.php?id_cms=$2&isolang;=$1&$4", "^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/category.php?id_category=$2&isolang;=$1&$5" , "^/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" => "/product.php?id_product=$2&$5" , "^/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" =>"/product.php?id_product=$1&$4", "^/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/category.php?id_category=$1&$4" , "^/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/cms.php?id_cms=$1&$4" , "^/([0-9]+)__([a-zA-Z0-9-]*)(\?(.*))?" =>"/supplier.php?id_supplier=$1&$4" , "^/([0-9]+)_([a-zA-Z0-9-]*)(\?(.*))?" =>"/manufacturer.php?id_manufacturer=$1&$4", "^/lang-([a-z]{2})/(\?(.*))?" => "/index.php?isolang=$1&$2" ) }
If I activate the canonical url option I can not access the home page as it redirects to: http://www.xboxaccesorios.com/inicio
Instead, you can check by clicking on: http://www.xboxaccesorios.com/10-producto-prueba.html if it works correctly even with friendly url.
Thanks in advance
Dani
Replies (3)
RE: Prestashop friendly url problems (SOLVED) - Added by danimx17 almost 14 years ago
Hello again,
I've been able to solve, if someone comes here having the same problems as me, the solution is very simple and probably the problem was that I had not understood the lighttpd documentation.
The problem:
By accessing the pages whose url never changes, for example the contact form will not serve me and my mod_rewrite code for the page is not accessed properly.
The solution:
"^ / url_alias" => "/ destiny_url"
example:
"^ / contact-with-us" => "/ contact-form.php"
RE: Prestashop friendly url problems (SOLVED) - Added by mariajhons about 11 years ago
Check this PrestaShop Module here: http://www.fmemodules.com/en/49-pretty-urls.html ... This PrestaShop module can automatically remove auto generated IDs and numbers from the URLs of your home, cateory, manufacturer, supplier and CMS pages.
RE: Prestashop friendly url problems (SOLVED) - Added by mariajhons over 10 years ago
This Module is also available at PrestaShop official Maket place at addons.prestashop.com here: http://addons.prestashop.com/en/seo-prestashop-modules/16633-pretty-urls.html