Jump to content

mod_rewrite and .htaccess don't work


Recommended Posts

I have the next problem and I don't know how to solve It.

 

When I add a new shop, in "virtual url" field It says that mod_rewrite seems not to be activated in my server, but I spoke to my host server and they confirm to me that It is actived, and they tell me that I have to change the code of .htaccess reading this http://support.godad...-use-modrewrite but I view in my htaccess that says the code is created automaticatly

 

"# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution"

 

So I don't know what to do, could someone to help me.

 

My store is: www.centralpedidos.com/herbalife

 

Thanks

  • Like 1
Link to comment
Share on other sites

hi mate,

 

try the following.

  • delete your htaccess and create a new blank one
  • try activating friendly urls and regenerate the htaccess file
  • verify that the htaccess as code in it
  • if all the code is there see if it now works.
  • if the code is not there then that is your issue.

if that did not make prestashop urls work properely you need to test to see if mod_rewrite is actually working on your server,

 

http://www.vbseo.com/f77/how-check-if-mod_rewrite-working-my-site-21502/

 

also a very helpful site.

 

http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/

 

shoulders

  • Like 1
Link to comment
Share on other sites

Yes I have .htaccess in my root wich is: www.centralpedidos/herbalife/

 

I chequed if my mod_rewrite is working with the link you gave me and It is working.

 

So I activate friendly urls, but doing this the site doesn't work. I think because I didn't make the second part of the second point that you told me:

  • try activating friendly urls and regenerate the htaccess file

To regenerate the htaccess file, do I have to click any button?

Link to comment
Share on other sites

on ps1.5 you just click save on the seo page and i think it automatically generates the htaccess code. in 1.4 you had to create a htaccess file and then click generate, in 1.4 you had this cool option where you could add your own htaccess code.

 

easiest way to see it it has worked is to see if the code has been added to the htaccess.

 

when you say it does not work, what is not happening exactly?

 

I noticed that your site is going to be spanish, maybe this is a fault with a non english site

 

in your admin panel on the seo page, is the Base URI set right for your location of your shop, /herbalife/ ?

 

when you checked rewriting was working, did you try this in the full webroot, ie www.centralpedidos.com , some webhost will not scan sub folders for htaccess files, some hosts it can tak up to 2hours before it scans the file. Try the mod rewrite test in the subfolder www.centralpedidos.com/herbalife . lastly for now check and see if there is any rules in the root .htaccess that would prevent the sub folder htaccess from working.

 

lastly, when you created a htaccess file, did you put the . at the front. the file name should be .htaccess

 

other than these suggestions it must be a fault with multishop, i have never used this so i cannot help you there but it sounds like an issue with PS or one of its settings rather than your server.

shoulders

Edited by shoulders (see edit history)
Link to comment
Share on other sites

Thanks for your help Shoulders... It doesn' work.

 

My version: 1.5.0.15

 

I deleted my htaccess and created a new blank one, later I click save on the seo page and automatically generates the htaccess code:

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]
# Images
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /herbalife/index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

in your admin panel on the seo page, is the Base URI set right for your location of your shop, /herbalife/ ? I added in the friendly url for index: herbalife, and doesn't work.

 

I have my .htaccess in /herbalife/ folder

Link to comment
Share on other sites

Thanks for your help Shoulders... It doesn' work.

 

My version: 1.5.0.15

 

I deleted my htaccess and created a new blank one, later I click save on the seo page and automatically generates the htaccess code:

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]
# Images
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /herbalife/index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

in your admin panel on the seo page, is the Base URI set right for your location of your shop, /herbalife/ ? I added in the friendly url for index: herbalife, and doesn't work.

 

I have my .htaccess in /herbalife/ folder

Link to comment
Share on other sites

the htaccess looks fine (same as my ps1.5)

 

just a quick note, i have gone to your site and it is displaying a 403 error, this means forbidden. there might be issues with permissions somewhere. I also noticed /ese/ was missing of the end. This points towwards the fault being before prestashops code is being called.

 

check you erver logs and see if there are any errors that help you find the issue.

 

if possibly install prestashop again from the begining but use only one language.

 

also look up a function called symbolic links. try adding these lines before your presashop code in the htaccess.

 

# enable symbolic links
Options +FollowSymLinks

 

Base URI should be /herbalife/

Edited by shoulders (see edit history)
Link to comment
Share on other sites

I deleted all my ftp and db to setup from 0 all prestashop.

 

It works perfectly until I activate "url friendly" that creates .htaccess and the front-end doesn't work.

 

.htaccess:

 


# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]
# Images
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /herbalife/index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

Link to comment
Share on other sites

My base url is /herbalife/ and I added these lines of code to .htaccess but nothing:

 

# enable symbolic links
Options +FollowSymLinks
# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]
# Images
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /herbalife/index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

When you went to the site and viewed displaying a 403 error, It was because I was deleting ftp and db.

Link to comment
Share on other sites

i could dial in tommorow and have a look for you. about 20.00GMT . i would need ftp, cpanel and prestashop details.

 

please note i cannot be responsible for any data on your website. (i do websites for a living) but i do not want to mess with a mission critical website.

 

PM me your details if you want to go ahead. i might be able to look late on tongiht if i get time.

Link to comment
Share on other sites

FIXED.

 

because the shop is in a sub folder when the htaccess is created there is a missing statement in the htaccess file

 

RewriteBase /herbalife/

 

so i added it in the file as shown below

 

RewriteEngine on
RewriteBase /herbalife/
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]

 

You need to get your file permissions fixed still as i think it will cause problems later on.

 

I have added this bug on to forge.prestashop.com

  • Like 1
Link to comment
Share on other sites

Perfect!!! I add a line of code for every shop and It works:

 

I have two shops "alex" and "sergio" and both work perfecly!! The code:

 

RewriteEngine on
RewriteRule ^/alex/.*$ /herbalife/index.php [NC,L]
RewriteRule ^/sergio/.*$ /herbalife/index.php [NC,L]
RewriteBase /herbalife/
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]

 

Really thanks for your help. You helped me a lot, I would like to send you a gratification, how can I do It?

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

i saw on admin seo page -->warning URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URLs you must activate this mod.

 

Here My code after delete and generate new

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]
# Images
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^www.kedaiperkakas.com$
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

I still see di the warning on seo page. how i fix this!!

 

and i can not used cart checkout!! it's said : my cart is empty

how i do fix this! i test at local komputer it's work well on hosting (live host) not gone well.

 

Thank

post-374708-0-37842300-1349058181_thumb.jpg

Link to comment
Share on other sites

  • 3 months later...

I have Prestashop 1.5.3.1 with no customizations.

I'm hoping to fix this Friendly URL issue before I go live.

My site's links work perfectly when Friendly URL is not active. As soon as I active this, the following links don't work: Tags, Cart, Login.

Code is automatically generated in my .htaccess file.

My site Base URI is /

Thanks in advance for your help.

Edited by dformica (see edit history)
Link to comment
Share on other sites

I have Prestashop 1.5.3.1 with no customizations.

I'm hoping to fix this Friendly URL issue before I go live.

My site's links work perfectly when Friendly URL is not active. As soon as I active this, the following links don't work: Tags, Cart, Login.

Code is automatically generated in my .htaccess file.

My site Base URI is /

Thanks in advance for your help.

 

there might be an issue with 1.5.3.1 issues. look at this forge issue

http://forge.prestashop.com/browse/PSCFV-6542?focusedCommentId=66758#comment-66758

Link to comment
Share on other sites

  • 2 years later...

thanks for question sirkiu and shoulders for reply. im having similar issue . shop root is http://4u.ie/shop . multistore setting http://4u.ie/shop/1 = 404 error. below is htaccess file on 4u.ie/shop. i do not have htaccess file on 4u.ie , do i need one ? if so what do i put on htaccess file on 4u.ie? thank you shoulders and sirkiu again, trev

 

htaccess 4u.ie/shop

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
 
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule . - [E=REWRITEBASE:/shop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule . - [E=REWRITEBASE:/shop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^1/?$ /shop/1/index.php [L,R]
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^1/(.*) /shop/$1 [L]
 
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule . - [E=REWRITEBASE:/shop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^a/?$ /shop/a/index.php [L,R]
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^a/(.*) /shop/$1 [L]
 
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule . - [E=REWRITEBASE:/shop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^test/?$ /shop/test/index.php [L,R]
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^test/(.*) /shop/$1 [L]
 
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^4u.ie$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>
 
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
 
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>
 
FileETag INode MTime Size
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
</IfModule>
</IfModule>
 
#If rewrite mod isn't enabled
ErrorDocument 404 /shop/index.php?controller=404
 
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
Link to comment
Share on other sites

  • 11 months later...
×
×
  • Create New...