Link to homepage from package



  • Hello,
    maybe everyone noticed but since it doesn't have any impact just ignored, but in the web interface, some package work under subdirectories (see snort), and when you click on the pfsense logo on the left/upper corner to go to the homepage, the link points to /xxxxx/index.php instead of /index.php (where xxxxx is the subdirectory where the package pages are stored). This in the default theme.

    I know it's very easy to bypass the problem, but if that link could just point to "/" there would be no problem to bypass.. :D

    Thanks!





  • great! (I was searching in the bug archive for "link homepage" before posting, but I didn't find it).

    Actually, if the link could post to just "/" instead of "/index.php" would be better (ok, SEO considerations doesn't apply to the webinterface, but it would be the same address you see when you log in).

    Thanks,
    Michele



  • you want SEO on your pfsense?

    For me its better to use /index.php since you are actually requesting the exact file, whilst  / will go to another routine that will look for index.php.



  • SEO the webinterface has absolutely no sense, it's just a matter of coherence with the initial request the browser makes to the webinterface (atleast you don't explicitly digit /index.php in your address bar) and an optimization in the maintenance of the webinterface, if one day the initial page has to be changed from index.php to something different, you need to apply only 1 change, if you have many links to /index.php in the webinterface you'll have to apply many changes…

    anyway, it is almost the same, it's just a matter of opinions... the "important" thing is that the link to the initial page will work...

    bye!



  • actually you will only change one file, and only 1 character because it resides on fbegin.inc which used by every page.

    cheers.


  • Rebel Alliance Developer Netgate

    Only certain packages do this, and it's never really been supported. Some packages put their files in a subdirectory under /usr/local/www/ instead of in with the other files.

    The link back to the main index page can't start with / because that breaks other functionality.



  • ok so must rely on /usr/var/www/packages/package-name/index.php that forwards to main.


  • Rebel Alliance Developer Netgate

    Something like that, yeah, but it needs to be fixed in the packages themselves.



  • Is there any place the header-left logo will be directed when clicked?



  • @jimp:

    Only certain packages do this, and it's never really been supported. Some packages put their files in a subdirectory under /usr/local/www/ instead of in with the other files.

    The link back to the main index page can't start with / because that breaks other functionality.

    if the link back can't start with / then the easier thing could be just to link to the "server name and port" of the current request… for example: http[ s ]://<servername>:<port>/[index.php]…
    this just to avoid to patch n packets or to delegate the patching to different people that made the packet, but just to fix this problem in one place only...
    just a suggestion...</port></servername>


  • Rebel Alliance Developer Netgate

    Using an absolute link is even worse than using a relative link starting with /



  • @jimp:

    Using an absolute link is even worse than using a relative link starting with /

    what if I add a simple index.php in the snort directory that just contains:

    what do you think about it? This should not break any functionality and solve the problem…


  • Rebel Alliance Developer Netgate

    Still the same issue as before with a relative link starting with /

    Now if you used ../index.php, that might be ok.



  • @jimp:

    Still the same issue as before with a relative link starting with /

    Now if you used ../index.php, that might be ok.

    ok, I made it… and pushed all the files in my clone... (also the ones for LCDProc, sorry but I thought that a "commit" was enough)...

    Can you please merge the changes in the main repository?


Log in to reply