httpd-users mailing list archives

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

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:

 

switch ($_SERVER['REQUEST_METHOD']) {

case "GET":

       $idLang = $_GET['idLang'];

       break;

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 :-)

Richard

 

 

________________________________

From: Andrew Hole [mailto:andremailinglist@gmail.com] 
Sent: 26 March 2009 10:47
To: users@httpd.apache.org
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
</Location>

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
http://localhost/index2.php

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

Thanks
A.






**********************************************************************
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
********************************************************************** 
 
Mime
View raw message