Jump to content

redirection loop in shop main page


Recommended Posts

Hello,

 

I'm still struggling with my PS implementation in my internet simulator made for training in places where there is no internet connexion (e.g in jailhouses).

 

  1. Here is the description of the architecture :
  • the server is a windows 7 machine running xampp 5.6, (localhost)
  • all the sites are in subdirectories of /xampp/htdocs,
  • prestashop (1.6) is in /xampp/htdocs/MYSITES/mysites_cat1/www/
  • Apache httpd :
    • DocumentRoot "C:/xampp/htdocs"
    • LoadModule rewrite_module modules/mod_rewrite.so
  • each site is defined as a virtual host in apache/conf/extra/httpd_vhosts.conf ; for Prestashop :
    • <VirtualHost *:80>
         DocumentRoot "c:/xampp/htdocs/MYSITES/mysites_cat1/www/prestashop"
         ServerName www.prestashop.org
         RewriteEngine on
      </VirtualHost>
  • the SEO preferences are :
    • domain = www.prestashop.org,
    • domain SSL : www.prestashop.org
    • physical_URI : /
  • I found that PS generates a .htaccess file that contains :

 

# ~~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_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>


# Disable Multiviews
Options -Multiviews

RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/xampp/htdocs/CLIPeNET/www_Clip/www/prestashop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# AlphaImageLoader for IE and fancybox
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

#If rewrite mod isn't enabled
ErrorDocument 404 /xampp/htdocs/CLIPeNET/www_Clip/www/prestashop/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

 

Here is the description of the problem :

  • when I type : www.prestashop.org,  the URL is dispalyed as www.prestashop.org/index.php? and I get a message saying that there is a redirection loop (the web console doesn't give much more info),
  • when I type : www.prestashop.org/adminxyze, I get the login page for the BO admin and get the admin page OK (with sub menus and everything),
  • when I click on the "my shop" link upper left, the main page of the shop is displayed OK and all the interna links work OK (apparently, only when there is the "RewriteEngin on" in the Virtual host !!),
  • when I type www.prestashop.org again (as on bullet 1) I still get the redirection loop; it seems that it is looking for a cookie or  ? (as Firefox webconsole shows a loop of  302 GET indexPhp).

 

I think the description of the issue is complete and hope that some expert can help me te get out of this trap.

 

Regards

Link to comment
Share on other sites

Is any body able to help me ?

 

Since my last post, a friend of mine advised me to add a "AllowOverride" directive in my VirtualHost block (because of the "<Files ".ht*">     Require all denied  </Files>" in the httpd.conf file. This was a good point but unfortunately it did'nt solve the problem and I still have a redirection loop when I try to access to my shop. :( :(

 

Obviously, the Prestashop internal redirection is tricky.

 

Please help.

 

Regards

Link to comment
Share on other sites

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