Jump to content

SSL works BO but not FO


Recommended Posts

Hi guys

 

I am using PS 1.5.4.1.

 

I have shared hosting with Heart Internet who have a free shared security certificate with their hosting. (https://web24.secure-secure.co.uk/)

 

When I enable SSL the BO works as it should, however the FO https sections (eg Login) returns a 404. FIrefox reports an additional 403 error:

 

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

 

I can see that the link it is trying to go to appears to be the 'correct' link so I am thinking it must be a redirect issue? To note, I get the same issue even with Friendly URLs switched off.

 

Below is my .htaccess file if that helps:

 

 

### Events Module Begin ###
RewriteRule ^event/(.*)-(.*)/cancel$ /modules/events/front.php?event=$1&cancel=1 [QSA,L,E]
RewriteRule ^event/(.*)-(.*)$ /modules/events/front.php?event=$1 [QSA,L,E]
RewriteRule ^event/(.*) /modules/events/front.php?page=$1 [QSA,L,E]
RewriteRule ^newevent$ /modules/events/front.php?newevent=1 [QSA,L,E]
### Events Module End ###
### Events Module Begin ###
RewriteRule ^event/(.*)-(.*)/cancel$ /modules/events/front.php?event=$1&cancel=1 [QSA,L,E]
RewriteRule ^event/(.*)-(.*)$ /modules/events/front.php?event=$1 [QSA,L,E]
RewriteRule ^event/(.*) /modules/events/front.php?page=$1 [QSA,L,E]
RewriteRule ^newevent$ /modules/events/front.php?newevent=1 [QSA,L,E]
### Events Module End ###
SetEnv  DEFAULT_PHP_VERSION 5
DirectoryIndex index.php
RLimitCPU 180

# ~~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
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}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.brillbirdaustralia.com.au$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^www.brillbirdaustralia.com.au$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}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} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^web24.secure-secure.co.uk/brillbirdaustralia.com.au$
RewriteRule ^.*$ %{ENV:REWRITEBASE}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

 

Any help or foresight is greatly appreciated.

Link to comment
Share on other sites

Thank you for taking the time to respond and post that link.

Unfortunately server side code is not my strong point, and my hosting technical support suggested the Prestashop forums!

I just don't understand why it would work as it should in the back office, but not as it should in the front office.

Any tips on how to troubleshoot this would be most welcome.

Link to comment
Share on other sites

  • 9 months later...

I'm having exactly the same problems with PS 1.6 - using shared SSL, BO works fine, but the FO gives a forbidden page error on say the Sign In link.

 

The hosts tell me that I need to to modify the RewriteBase (or the environment REWRITEBASE) when the SSL is in use to take into account the additional directory level. This is a little beyond what I know how to do with htaccess. Can someone help?

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