Change Behavior of href and "/"

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

Change Behavior of href and "/"

Postby HubriSonics » 11. January 2017 20:53

Hello,

An href value of "/" takes my browser to (htdocs/index.php). How do I configure XAMPP so that "/" takes my browser to (htdocs/current-child/index.php)? Can this be done with a copy of php.ini in each child directory? Can it be done with a copy of .htaccess in each child directory?

Regards,

HubriSonics
HubriSonics
 
Posts: 2
Joined: 11. January 2017 20:45
XAMPP version: 5.6.28
Operating System: 32 bit Windows Vista

Re: Change Behavior of href and "/"

Postby Altrea » 11. January 2017 21:10

Hi,

"/" always means "root of the currently used domain". It does not point to any file (the webserver chooses which file is used as index document).
So if you want to show "htdocs/current-child/" by "/" you simply need to use that path as DocumentRoot.

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: 8845
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests