confused smileyRedirect.html keeps rejecting mod pages.

Posted by damavox 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
confused smileyRedirect.html keeps rejecting mod pages.
April 19, 2016 09:45AM
So i am really at my witts end with this one and so I think its time i ask for assistance,

I am attempting to do this media center mod to my PB install on my pi zero.

Here is what i have done:
-Downloaded, extracted, and moved the mediacenter folder to /www/.
-edited /www/index.html (main page) to reflect the new directory. IE: link to it.
by adding this line of code to /www/index.html
Language: HTML
<li><a href="/mnt/usbshare/share/mediacenter/">Media Center</a></li>

Then redirect.html sent me back to piratebox.lan

Next i tried pointing directly to /mediacenter/index.php

again redirect.html sent me back to piratebox.lan.

I attempted to clear my browser chache and also tried to create a static entry in /etc/host cause i read something about it in another part of the forum but neither of those things worked and redirect.html sent me back to piratebox.lan.

This happened to me before when i was trying to cofigure the calibre ebook server.

I also tried to rename the redirect.html file to something different but that created a 403 error.

I am dedicated to getting this mod working and could really use some helpful assitance from some of you pros on this one. i have been scratching my head on and off for months concerning this issue.



Edited 1 time(s). Last edit at 04/19/2016 09:46AM by damavox.
Re: confused smileyRedirect.html keeps rejecting mod pages.
April 20, 2016 07:35PM
you have some major misunderstanding how links in HTTP and webservers work, to be honest.

"/mnt/usbshare/share/mediacenter/" is pointing to a particular point on the filesystem
When you click on the browser, the browser tries to contact
Language: PHP
"http://piratebox.lan/mnt/usbshare/share/mediacenter/"
So, that is translated to the following path on the filesystem from your webserver
/opt/piratebox/www/mnt/usbshare/share/mediacenter/

So the solution would be to create a hardlink in you www folder to the mediacenter folder..
ln -s /mnt/usbshare/share/mediacenter /opt/piratebox/www/
Then the following link
Language: PHP
http://piratebox.lan/mediacenter/
Should work.


If you have extracted everything to /opt/piratebox/www/mediacenter , you can omit the link and just use
Language: PHP
http://piratebox.lan/mediacenter/

spinning smiley sticking its tongue out

Matthias
Re: confused smileyRedirect.html keeps rejecting mod pages.
April 21, 2016 07:03AM
smileys with beer
Thanks Matthias,
I realized where I went wrong after investigating how the other pages work.
Then your explanation solidified it for me smiling smiley.
Alot of it had to do with setting the correct permissions as well, for whatever reason when i tried to gain permissions with my original image it must have been corrupt or something, after re-burning the image gaining permissions were gained / set with ease.
Thanks again!