Jump to content

Store not found when Mobile Template is activ


toybox

Recommended Posts

Hi together,

I´m running Presta 1.4.6.2. and have the mobile template V0.3.8. installed.

The shop is working prefect, when the mobile template is deactivated in the back office.
I can type the URL www.xy.com and will be directed to my shop -> www.xy.com/shop

But when the mobil template is activated and I type the URL www.xy.com, than I get an error note.
In the desktop view and also in the mobil view with smartphone or tablett.
I get "Forbidden - You do not have permission to access this document."

But when I type the path into the browser (www.xy.com/shop) than the shop is shown perfect in the two different versions.
The desktop version AND the mobil version.

So I´m wondering what will be switched here, when the mobl template will be activated?
Or must be done a change in the index.html or index.php?

I have tried several changes, but without a solution.

Any help would be appreciated.

Thanks!

 

 

Link to comment
Share on other sites

Thanks for your reply.

I have checked the htaccess. But to be honest, I see a lot of rewriting rules, and I can not imagine what ruel can be wrong or is a conflict.
And in the top of the htaccess is written:

PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE.

I have also rewrite the htaccess from the back office, but where do I find the "new" htaccess?

 

Link to comment
Share on other sites

I have just checked the htaccess line by line only to find anything which can be a conflict in my "view".

There is written:

RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /xxxstore/category.php?id_category=$1&noredirect=1 [QSA,L]

That is the only line with "noredirect". The next line is:

RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /xxxstore/category.php?id_category=$1 [QSA,L]

I don´t know whether is all correct or a reason for my problem.
 

 

Link to comment
Share on other sites

 - try what happens when you disable pretty urls. What urls do you get then. And does the redirect from the root then work ok?

 - generating .htaccess is done on the SEO&url's page by pressing save on the section where you define how your pretty url should look like.

Link to comment
Share on other sites

OK, generating htaccess is clear, was not sure as it took some time as the changed version was shown in the ftp.
 
In the BO I have the option at SEO & URLs to avtivate the "simplified URL" and to generate a new htaccess.
This was done. The htaccess with the simplyfied URL switched off is smaller than the other one, when "simplified URL" is switched on.
 
But no change in the view or the browser. Also different results in Chrome and Firefox.
 
But when I have made a change in the BO switching the "simpliefied URL" off and on,
I got a warning at the top of that site in the BO with "The Mobile Theme has been disabled, click here to re-enable-it.
And by clicking on the link, I was only directed to the configuration site of the mobil template, but there was no change.
 
I have tried several options switching the URL or/and also the mobil template on and off, also in combination with the "normal" and smaller htaccess. But there was not any massiv change in the view, mostly more mixups between mobil and standard view.
For exmaple Standard store view, but checkout than in mobil view.
 
Fundamental question: You are writing "disable pretty urls". I´m not sure whether you are refering to the site in the BO -> SEO & URLs.
I have also found a modul at prestashop to buy, which is called "Pretty URL".
I´m not sure whether you refer to this modul.
If so, I do not have that modul and it works only at Prestashop 1.5.0.0., I have 1.4.6.2.
 
In the modul "mobile template" there is also the option "Settings" for sub-domain (optional).
But I have never noticed a change when I have made changes there.
 
Thanks again for your help.
Link to comment
Share on other sites

Pretty urls are also named "friendly urls" in the Prestashop backoffice.

If I remember well the basic url for a product page in PS 1.4 looks something like "www.myshop.com/product.php?id=123" and when you enable friendly urls it becomes something like "www.myshop.com/mycat/123-paperclip". Htaccess accomplishes this transformation.

Link to comment
Share on other sites

Yes, that is correct! I get this result, but only if I type the path into the browser.

If I only type the URL, than I do not see these paths behind the URL.

And as mentioned, when Mobile Template is on, than no access to site and "Forbidden" or in Chrome "www.xy.com redirected you too many times"
 

 

Link to comment
Share on other sites

You have three redirecting systems active (root->shop, pretty url and mobile). Somehow they are interfering with each other. 

How Prestashop's pretty url system works is well known but I don't know the other two systems. I have asked you some questions about them but your answers didn't bring any clarity. 

What I would suggest is to disable the redirection from root to shop subdirectory as you have it now and instead to implement a line with that effect at the start of .htaccess.

Link to comment
Share on other sites

Hi musicmaster, I´m sorry, if my replies haven´t brought more clarity. Perhaps I wasn´t sure on what I have to look more carefuly..

I´m not sure with your comment regarding "three redirecting systems active".
My store is on a Plesk server, the root is named "httpdocs/" and I have a index.html and a index.php there.

The index.html is:

<html>
<head>
<title>http://www.xy.com/store/ - store name</title>
</head>
<frameset rows="100%" frameborder=0 framespacing=0 border=0>
<frame src="http://www.xy.com/store/" name="Content" noresize>

<noframes>
Your browser can not view that site!
Goto to URL <a
href="http://www.xy.com/store/">http://www.xy.com/store/
manually.</a>
</noframes>
</frameset>
</html>

The index.php is:

<?php
header("Status: 301 Moved Permanently");
header("Location:http://www.xy.com/store/");
exit;
?>

One level down in the root, on the store level, is the htaccess, and this will be generated from Prestashop in two different versions depending on pretty url switched on or off.

You suggest "to disable the redirection from root to shop subdirectory as you have it now and instead to implement a line with that effect at the start of .htaccess .

Fundamental I understand your thought.

My first question to this is what kind of htaccess shall be generated? Friendly URL on or off? When I switch the friendly URL off, than I have a warning in my Prestshop BO. So I would think I work with friendly URL switched on the BO and generate a new htaccess.

To disable the redirection from the root to the store subdomain means to do this in the index.php

OK, but I´m not sure how to find the "start of htaccess" or which line must be changed.

The first rewrite rule in the htaccess (friendly switched on or off) is:

RewriteRule ^api/?(.*)$ /store/webservice/dispatcher.php?url=$1 [QSA,L]

I hope this brings more clarity.....Thanks!

 

 

 

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