Jump to content

Shop URL Configuration Issues in 1.5.2


Recommended Posts

Hi All

 

I thought I'd got everything set up properly since my upgrade to 1.5.2 but picked up a serious problem when trying to access the site using http://www.myshop.com.au

 

It goes to the homepage but all the images are missing.

There's no problem if I go to http://myshop.com.au

 

If I then go to a product or category page using www I redirect to the 404 page.

 

Even worse if I use https://www.myshop.com.au which generates SSL error warnings in IE and stops.

 

Again everything is fine for SSL and non SSL URL's if accesses from http://myshop.com.au

 

In "Preferences > SEO & URLs" I have :-

Shop Domain: myshop.com.au

SSL Domain: myshop.com.au

Base URI: /

 

In "Advanced Parameters > Configuration Information > View" I have :-

Prestashop version: 1.5.2.0

Shop URL: https://myshop.com.au/

 

This would seem wrong in relation to the settings in preferences but I don't know where else to go to change it.

 

I should also mention I've tried setting Canonical URL's to "on" but that results in the browser hanging completely.

 

Can someone please tell me where else these URL's need to be defined as I see a lot of conflicting information about this.

 

Thanks

deepee

Link to comment
Share on other sites

Thanks, for that.

 

I have been testing it with and without canonical URL set but it didn't work.

I should mention that I test using IE, set to clear all history and caches each time it shuts down.

 

I also had a look at .htaccess but find that you can't set up redirects from www to root any more.

 

Unfortunately I've had to re-instate my pre-upgrade site in the interim because of the inconsitencies and critical issues over the last 10 days and a huge loss of business.

 

Not my prefered option as I've put in many, many hours to get it to the point of going live.

Link to comment
Share on other sites

Never ever try to upgrade a live site, that is the biggest no-no.

 

Make a (Dev) copy of the site, try to upgrade the dev, take notes of every change you make, and only after you have tested everything on the dev site (registration + cart + checkout), do the same to the live site.

 

Redirecting from www to non-www (or the other way) is best to be done from htacess file, you can see an example at http://www.presto-changeo.com/en/content/6-prestashopseotips

  • Like 1
Link to comment
Share on other sites

Thanks for the replies.

 

FYI the site was upgraded offine on a local VM running LAMPP and tested thoroughly before going live.

It's only when the live shop URL's needed to be changed from localhost that the wheels started coming off.

 

I'm familiar with .htaccess redirects but the auto generated code in prestashop looks very different:-

<code>

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mysite.com.au$

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

</code>

 

What I should have would look like this:-

<code>

RewriteCond %{HTTP_HOST} ^www.mysite.com.au$ [NC]

RewriteRule ^(.*)$ http://mysite.com.au/$1 [R=301,L]

</code>

 

So if I change it what effect is it going to have on these other strange rewrite rules?

 

Also In "Advanced Parameters > Configuration Information > View" I have :-

Prestashop version: 1.5.2.0

Shop URL: https://myshop.com.au/

 

Where did it pick the https URL from as I didn't set it?

 

As mentioned, the ideal would be to have a detailed list of where the shop URL's appear in the database, and in which files, so they can be checked to make sure that upgrade routines etc. haven't changed them to invalid values.

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

Just to rephrase that, can anyone tell me how I can get my own rewrite code into the autogenerated prestashop .htaccess code without breaking anything? (I mean I do know how to edit and merge the file, just not the effect of doing so.)

 

I have no idea what the autogenerated rewrites do and I hope someone can explain.

 

Prestashop auotogenerated .htaccess:-

 

<code>

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mysite.com.au$

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

</code>

 

What I believe I need to include to get www to resolve to root:-

 

<code>

RewriteCond %{HTTP_HOST} ^www.mysite.com.au$ [NC]

RewriteRule ^(.*)$ http://mysite.com.au/$1 [R=301,L]

</code>

Link to comment
Share on other sites

I just tried adding "RewriteRule ^(.*)$ http://mysite.com.au/$1 [R=301,L]" above "RewriteRule . - [E=REWRITEBASE:/]"

 

It breaks product images loading on the homepage and reults in 404's for every page accessed thereafter.

 

Where then can I define the rule for www.mysite.com.au to rewrite to mysite.com.au?

 

This seems such a fundamental issue, surely someone knows the answer!

 

Any developer's support staff reading the forum?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

I had the same ploblem. Just get into the control panel Preferences>SEO URL>

when you change "Automatically redirect to Canonical URL" option from yes to no and visa versa it creates a new .htaccess file. Setup your your shop domain and ssl properly ....and toggle and save Automatically redirect to Canonical URL option

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...