Jump to content

URL rewriting broken after upgrading to 1.5


Recommended Posts

Under 1.4.9 and earlier I kept getting the error message "URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URLs you must activate this mod." or its older equivalent. BUT, url rewriting still worked. Now that I've upgraded to 1.5 its all broken. no product pages show, etc.

 

I've confirmed that mod rewrite is enabled and .htaccess lists all the files that need to be rewritten.

 

it just doesnt work.

 

how do i troubleshoot this?

  • Like 1
Link to comment
Share on other sites

Hi i have this same problem and i make this

add

first line

 

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 ^([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><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"
</IfModule>
FileETag INode MTime Size
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>#If rewrite mod isn't enabled
ErrorDocument 404 /sklep/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

Edited by tczaude (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi, thanks for the reply.

 

I could not figure it out, i went back to version 1.4.9

 

Sadly I'm having the same error. I did regenerate a completely new .httaccess file but the issue remains.

 

From what I can tell, the pages ending in .php within the /modules/ folder end in the 500 internal server error

Link to comment
Share on other sites

Hi All

 

I found this thread because I have been having the same problem after upgrading an old version 1.2.4 site with one click upgrade.

 

After working through a number of issues I got everything working, except when I enabled friendly URL's.

 

I worked through the errors, tried various fixes including the one above, but nothing worked.

 

I'm working on a local XAMPP system and have a number installations I've been working on and can activate for trial purpose.

 

I took the .htacess file from a fresh install of 1.5.017 and put it into my upgraded installation.

 

The friendly URL's are now working,

 

There must have been some invalid re-writes generated when my original .htaccess was modified during the upgrade.

 

Hope this helps.

 

deepee

Link to comment
Share on other sites

I deleted the old .httaccess file and had the store generate a new one, so this is still a mistery to me and have not been able to solve it. Currently I have a developer looking it over. I've lost a lot of time and orders trying to resolve this.

Link to comment
Share on other sites

I deleted the old .httaccess file and had the store generate a new one, so this is still a mistery to me and have not been able to solve it. Currently I have a developer looking it over. I've lost a lot of time and orders trying to resolve this.

 

Tried that first and it didn't work for me either.

 

It worked when I replaced the .htaccess with one from a fresh installation of 1.5.17, installed with default options (i.e. populated with sample products etc.) and no changes made to it.

Link to comment
Share on other sites

×
×
  • Create New...