IGNITER Posted December 10, 2013 Share Posted December 10, 2013 Hello,I have this strange problem with Prestashop 1.5.6.1.When I type the address of the website, after the address automatically is added '/index.php'.Nothing bad at first sight, but the dynamic links from the mails are loaded like this one: http://website.com/index.phpmy-account.php instead of http://website.com/my-account.php In result the page could not be opened. I know this must be something simple, but I am tired to dig over the Internet about it, so please, if somebody knows what it is, help! Link to comment Share on other sites More sharing options...
Radu Posted December 10, 2013 Share Posted December 10, 2013 check your preferences -> seo & urls section from backoffice. You shouldn't have any index.php under Shop domain for example Link to comment Share on other sites More sharing options...
IGNITER Posted December 11, 2013 Author Share Posted December 11, 2013 I have seen many similar topics in internet, but it seems to be not the real cause of my problem. The domain name is clear without any /index.php behind Link to comment Share on other sites More sharing options...
El Patron Posted December 11, 2013 Share Posted December 11, 2013 back office-->preferences-->seo & urls edit 'Page' index remove friendly URL (requires mod_rewrite and friendly urls to be active) I have seen many similar topics in internet, but it seems to be not the real cause of my problem. The domain name is clear without any /index.php behind Screen Shot 2013-12-11 at 10.09.26 AM.png Link to comment Share on other sites More sharing options...
IGNITER Posted December 11, 2013 Author Share Posted December 11, 2013 Friendly URL is not enabled by default. After deletion index page by default positioned on 4-th position nothing changed the picture. I will try to inspect the apache config for any case, but i doubt is that, because I have already running another older prestashop with similar config without any issues. I even temporary removed the .htaccess file in the root dir if for some reason is messing with my website and no luck. Link to comment Share on other sites More sharing options...
El Patron Posted December 11, 2013 Share Posted December 11, 2013 there are plenty of solutions proposed outside of Prestashop for hiding index.php. do you plan on 'not' using friendly url's? Let us know what your final solution is. Link to comment Share on other sites More sharing options...
Radu Posted December 12, 2013 Share Posted December 12, 2013 do you have some rewrite rules in your htaccess or httpconf? someone from wordpress had a similar issue http://wordpress.org/support/topic/permalinks-appends-indexphp-to-urls-after-server-move Link to comment Share on other sites More sharing options...
IGNITER Posted December 12, 2013 Author Share Posted December 12, 2013 I will try to provide you with little more info. Here is a list of the configuration if that could help: Captured from the presta Server information Server information: Linux #87-Ubuntu SMP Tue Nov 12 21:38:12 UTC 2013 i686 Server software version: Apache/2.2.22 (Ubuntu) PHP version: 5.3.10-1ubuntu3.8 Memory limit: 128M Max execution time: 300 Database information MySQL version: 5.5.34-0ubuntu0.12.04.1 MySQL engine: InnoDB Tables prefix: ps_ Apache virtual host config <VirtualHost *:80> <------>ServerAdmin webmaster@localhost <------>ServerName domain.com <------>ServerAlias www.domain.com <------>DocumentRoot /var/www/Site_Root/ <------><Directory /> <------><------>Options FollowSymLinks <------><------>AllowOverride none <------></Directory> <------><Directory /var/www/Site_Root> <------><------>Options Indexes FollowSymLinks MultiViews <------><------>AllowOverride None <------><------>Order allow,deny <------><------>allow from all <------></Directory> <------>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <------><Directory "/usr/lib/cgi-bin"> <------><------>AllowOverride None <------><------>Options ExecCGI -MultiViews +SymLinksIfOwnerMatch <------><------>Order allow,deny <------><------>Allow from all <------></Directory> <------>ErrorLog /var/log/apache2/error.log <------>LogLevel warn <------>CustomLog /var/log/apache2/access.log combined <------>ServerSignature On </VirtualHost> mod rewrite is enabled and it's working well I am using it as https redirection. I tried to temporary remove .htaccess file from site's root dir and then 'apache2ctl restart' and the index.php was still there. "AllowOverride all" is not my solution, I have inspected my config and there is nothing about index.php there and everything seems to be normal there. I am not planing use friendly URL at least for now I strive to start it. My main problem is the mail links that lead to nowhere. The presta itself returns each time on any level http://shopdomain.com/index.php, no matter if you type the address in the browser or you have been sent by some of the links from the mails. Thank you so far guys, if somebody have an idea how I can solve it don't hesitate. Link to comment Share on other sites More sharing options...
El Patron Posted December 12, 2013 Share Posted December 12, 2013 without friendly url's then you will need to use a solution outside of PrestaShop, i.e. with friendly url's you can control the url rewrite from back office then without friendly url's then PrestaShop is going to build, in this example index.php...it has no choice. I found this a nice article on the subject, hope it helps and is pertinent to your issue http://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html Link to comment Share on other sites More sharing options...
IGNITER Posted December 13, 2013 Author Share Posted December 13, 2013 I tried the .htaccess method from that article and I was amazed that it didn't change nothing. Here is the code that I put alone in .htaccess file, just copy/pasted it from the website. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Removes index.php from ExpressionEngine URLs RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteCond %{REQUEST_URI} !/system/.* [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L] # Directs all EE web requests through the site index file RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] </IfModule> Continue digging ... Link to comment Share on other sites More sharing options...
IGNITER Posted December 13, 2013 Author Share Posted December 13, 2013 (edited) Automatically redirect to the canonical URL "No" Yes NoRecommended, but your theme must be compliant. Disable apache multiviews "Yes" Yes NoEnable this option only if you have problems with URL rewriting. Here it is my solution, it works only in this combination. I knew that it must be something not very complicated. Thanks to anybody involved. ps: another helpful tip to those who use translated emails, there is a new set of variables in the website links, I guess some of the translated mails are copied from older versions of prestashop. For instance {shop_url}history.php is now {history_url} and the rest of them goes the same way. Edited December 13, 2013 by IGNITER (see edit history) 1 Link to comment Share on other sites More sharing options...
El Patron Posted December 13, 2013 Share Posted December 13, 2013 now I am wondering if you have mod_rewrite on your shop. can you turn friendly url's on and see friendly url's in your shop? another dirty way to tell is by removing the following surronding your rewrite code, which if mod_rewrite is not installed you would get a 500 error <IfModule mod_rewrite.c></IfModule> Link to comment Share on other sites More sharing options...
IGNITER Posted December 13, 2013 Author Share Posted December 13, 2013 There is mod_rewrite enabled "Module rewrite already enabled", but for some reason when I turn on friendly URL the website links are not working. Link to comment Share on other sites More sharing options...
El Patron Posted December 13, 2013 Share Posted December 13, 2013 There is mod_rewrite enabled "Module rewrite already enabled", but for some reason when I turn on friendly URL the website links are not working. ave maria! how are they not working? can you post a link where I can check the friendly url's... Link to comment Share on other sites More sharing options...
IGNITER Posted December 14, 2013 Author Share Posted December 14, 2013 Here it is, I will leave the Friendly URL on for a while so you can see it. Friendly URL is not really my primary target. I Guess that there is something to be done in order to make it work. Link to comment Share on other sites More sharing options...
Recommended Posts