Jump to content

Friendly URLs and Lighttpd


Recommended Posts

Hello everyone,

I'm running a fresh install of PrestaShop 1.4.3, and it's hosted on a Ubuntu Server 11.04 box with Lighttpd as the Webserver software. I found a rewrite setup from here:

http://www.prestashop.com/forums/viewreply/197925/

And everything seems to work fine, other than the images for items and categories. Those images do not show up.
I'm not good with the rewrite strings, so I'm hoping I could get some help getting those images to work. Only thing I'm having a problem with at the moment.

Thanks! This is the setup I'm rocking now, if you didn't find it on the page.

   url.rewrite-once = ( 
   "^/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$" => "/img/c/$1$2.jpg",
       "^/([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"
   ) 

Link to comment
Share on other sites

  • 5 months later...

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