HREF attributes for XAMPP menu navigation

Problems with the Linux version of XAMPP, questions, comments, and anything related.

HREF attributes for XAMPP menu navigation

Postby xamppnerd » 02. November 2012 00:14

Hi everybody,
I was wondering if somebody could tell me something about the way in which the href attrubute in the /xampp/navi.php file works? For personal purpose, I'm trying to change some links from:

Code: Select all
<a class=n target=_blank onClick="h(this);" href=/phpmyadmin/><?=$TEXT['navi-phpmyadmin']?></a><br>


to something like this:

Code: Select all
<a class=n target=_blank onClick="h(this);" href=.phpmyadmin/><?=$TEXT['navi-phpmyadmin']?></a><br>


And the problem is that my web browser returns an inappropriate address: http://localhost/xampp/.phpmyadmin/

How can I achieve this effect: http://localhost.phpmyadmin/ ??

Thanks in advance,
Xampp Nerd :-)
xamppnerd
 
Posts: 3
Joined: 01. November 2012 23:53
XAMPP Version: 5.6.3
Operating System: Linux

Re: HREF attributes for XAMPP menu navigation

Postby xamppnerd » 02. November 2012 00:41

Ok. I did something like that:

Code: Select all
<a class=n target=_blank onClick="h(this);" href=//localhost.phpmyadmin/><?=$TEXT['navi-zf2alb']?></a><br>


And the redirection looks fine: http://localhost.phpmyadmin/

But I still don't know how to get my address using just an ordinary 'dot' instead of double slash??
Any suggestions?

Xampp Nerd
xamppnerd
 
Posts: 3
Joined: 01. November 2012 23:53
XAMPP Version: 5.6.3
Operating System: Linux

Re: HREF attributes for XAMPP menu navigation

Postby Altrea » 02. November 2012 06:24

Hi xamppnerd,

The XAMPP navigation is using relative URLs. That means the TopLevelDomain (TLD) is builded with the information of the RequestURL. The browser itself build the correct RequestURL.

You can't change a relative URL to another TLD without using absolute URLs, like you done by using http://TopLevelDomain/...

xamppnerd wrote:But I still don't know how to get my address using just an ordinary 'dot' instead of double slash??

Which double slash? I don't understand that question, sorry.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6946
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: Windows 10 Pro x64

Re: HREF attributes for XAMPP menu navigation

Postby xamppnerd » 03. November 2012 01:15

Hi Altrea,

Thanks for your prompt response.
That explains why the absolute URL, in this case my miserable double slash, which I accidentally used works correctly :-)
What a pity I can't get rid of that single ending slash on my domain address http://localhost/ <-- this one ;-)

Bests,
Xampp Nerd
xamppnerd
 
Posts: 3
Joined: 01. November 2012 23:53
XAMPP Version: 5.6.3
Operating System: Linux


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests