RE: DirectoryIndex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 J

Richard

 

 


From: Andrew Hole [mailto:andremailinglist@xxxxxxxxx]
Sent: 26 March 2009 10:47
To: users@xxxxxxxxxxxxxxxx
Subject: 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
**********************************************************************

 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux