Page 1 of 1

all virtualhost/security being redirected to security.php

PostPosted: 03. January 2014 03:49
by the47thsen
I'm developing a site where I need to use the security URI. Is there any way to prevent it from redirecting to 'http://api.dev/security/security.php' ?

Maybe change is so only localhost/xampp/security would go to security.php?

Re: all virtualhost/security being redirected to security.ph

PostPosted: 03. January 2014 06:15
by Altrea
If you will not break anything you have to change multiple files. The following is not tested:

  • C:\xampp\apache\conf\extra\httpd-xampp.conf ~line 85
    Code: Select all
    Alias /security "C:/xampp/security/htdocs/"

    change the Alias to something different like
    Code: Select all
    Alias /xamppsecurity "C:/xampp/security/htdocs/"
  • same file ~line 130
    Code: Select all
    <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">

    change the word security to the same new Alias name you defined above
    Code: Select all
    <LocationMatch "^/(?i:(?:xampp|xamppsecurity|licenses|phpmyadmin|webalizer|server-status|server-info))">
  • In all used language files (C:\xampp\htdocs\xampp\lang\) change the a href of the variable $TEXT['security-text2'] to the new Alias.
  • In file C:\xampp\htdocs\xampp\navi.php ~line 68 change the a href to the new Alias
  • In all used language files (C:\xampp\security\htdocs\lang\) change the a href of the variable $TEXT['security-text2'] to the new Alias.
  • In C:\xampp\security\htdocs\securefunctions.php change the Alias multiple times to the new value
  • In C:\xampp\security\htdocs\security.php ~lines 26 and 214 change the Alias to the new value
  • In C:\xampp\security\htdocs\splash.php change the Alias multiple times to the new value

best wishes,
Altrea

Re: all virtualhost/security being redirected to security.ph

PostPosted: 03. January 2014 07:07
by the47thsen
Thank you very much Altrea.

I managed to to get quick solution by changing the httpd-xampp.conf file
Code: Select all
Alias /xampp/security "C:/xampp/security/htdocs/"


I will try your other steps too later.