Viewing Mobile site not found

Mobile site not found



User: Paul-RAGESW 12 years ago
HI,

Did you modify your code after publishing to a folder to change the path now?

If you publish from EverWeb and then put this site in the root folder on your server everything will work correctly.

-------------------------------
Paul
EverWeb Developer
User: Erik T. 12 years ago
I know that it will work if I put everything in the root folder. The problem is, that there is already another site published from the same ftp-directory.
So, there is already another page called "index.html". If I rename my initial page to something else (I renamed it to "velkommen.html"), that will work, but then there is a problem with the link to the initial page from the navigation bar. It will still link to a page called "index.html", which is of course not found.
User: Erik T. 12 years ago
After leaving it alone for a while, I have just returned to see if I could solve this problem.
I figured that if I referred to an external URL as the mobile site rather than one of my own pages, I could solve the problem of linking to an html-file placed in a subfolder.
The strange thing is, that if I go to this site on my iPhone "www.sak77.dk/Almindsoe_2014/velkommen_m.html" it works fine. But if I go to "www.sak77.dk/Almindsoe_2014/index.html" (the page that should redirect to the mobile site) I get an error saying "The requested URL /www.sak77.dk/Almindsoe_2014/velkommen_m.html was not found on this server.
This is the exact same address that works fine if you type it in manually and even if you copy the URL from the error message and paste that in ??!!?? I don't get it.
User: Jumbo T. 12 years ago
This is in the javascript code that redirects :

window.location = "/www.sak77.dk/Almindsoe_2014/velkommen_m.html";

So the browser tries to display the page with this URL :

http://www.sak77.dk/www.sak77.dk/Almindsoe_2014/velkommen_m.html

Find out what you did.
User: Erik T. 12 years ago
Well, Jumbo T. thank you for your answer, but this is what happens if you use an external URL for your mobile site.
In EverWeb for "Mobile Settings" I choose "External URL" and set the URL to "www.sak77.dk/Almindsoe_2014/information_m.html". If I then open the resulting html-file in a text-editor I read "window.location = "/www.sak77.dk/Almindsoe_2014/information_m.html";
I'm not sure I understand why this makes the browser search for http://www.sak77.dk/www.sak77.dk/Almindsoe_2014/information_m.html.
Anyway I opened all the main-pages in TextWrangler and removed the domain from the window-location. This way the file only reads:
window.location = "/Almindsoe_2014/information_m.html";
This seems to work but I just don't understand why it is necessary?
User: Erik T. 12 years ago
...oh, and by the way. If I leave out the domain name when writing the external link i EverWeb it will not know what server to look for, so it tries to find a domain called Almindsoe_2014, which of course does not exist.
User: Jumbo T. 12 years ago
If you link to an external page, include http://

Better is to link to "One of my pages".

Last edit 12 years ago
User: Erik T. 12 years ago
The original problem was that this site is placed as a sub-site to another site. This means that I publish the complete site to a folder placed in the door-directory of another site. If I use "One of my pages", it will look for the mobile-site in the root directory of the original site and not inside the folder, where I have published it.

I have tried to include http:// in the link to the external page, but that only results in the browser looking for "www.sak77.dk/http://www.sak77.dk/Almindsoe_2014/information_m.html
User: Paul-RAGESW 12 years ago
You can use the new 1.4 beta release, which is in the Announcements section of this forum to publish with a subdirectory when using FTP.

As for the issue you are having now with the full URL, that is a bug that will be fixed for version 1.4.

Sorry for the inconvenience.

-------------------------------
Paul
EverWeb Developer
User: Jumbo T. 12 years ago
Paste one of the scripts in the Head code box.

<script type="text/javascript">
<!--
if (screen.width < 700) {
window.location = "http://www.remote_location.com";
}
//-->
</script>

<script type="text/javascript">
<!--
if (screen.width < 700) {
window.location = "local_file.html";
}
//-->
</script>


Post Reply
You must login or signup to post.