httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Peacock" <>
Subject RE: [users@httpd] DirectoryIndex
Date Thu, 26 Mar 2009 11:01:27 GMT

Couldn't you do a $_GET or $_POST in your PHP code to check for idLang
and if nothing was specified, default the variable to 1? For example:



case "GET":

       $idLang = $_GET['idLang'];


case "POST":

       $idLang = $_POST['idLang'];



if ($idLang =="") { $idLang=1; }



As you're using the Javascript "Window.Location" it is going to change
the URL in the address bar.

I would add the PHP code above into Index2.php and set that as your
DirectoryIndex page.


Hope this helps :-)





From: Andrew Hole [] 
Sent: 26 March 2009 10:47
Subject: [users@httpd] DirectoryIndex


Hi guys!

There are two files in DocumentRoot:
index.php and index2.php

The following directive is configured in httpd.conf
<Location / >
    DirectoryIndex index.php

There is the following instruction inside index.php :
   window.location =localHost+"/index2.php?idLang=1";

When I invoke the URL on browser (http://localhost/)  appears

How can I hide index2.php in address bar? I just want to see always


Privileged/Confidential Information may be contained in this 
message. If you are not the addressee indicated in this 
message (or responsible for delivery of the message to such 
person), you must not copy, distribute or take any action in 
reliance to it.
In such case, you should destroy this message and kindly 
notify the sender by reply email. Please advise immediately 
if you or your employer do not consent to Internet email for 
messages of this kind. Opinions, conclusions and other 
information in this message that do not relate to the official 
business of Minorplanet Systems plc shall be understood as 
neither given nor endorsed by it. Minorplanet Systems plc, Registration no: 3372097
Minorplanet Limited, Registration no: 4072786
Greenwich House, 223 North Street, Leeds, LS7 2AA
VAT #: 698 1438 86
View raw message