07-04-2013
What if there really is a file named 'index'? What if there's a directory named 'index'? What happens when you have both an index.php and index.html, which wins, which loses?
You can use rewrite rules to change something without an extension into .php, but I don't know a way to make it know which one you really wanted.
5 More Discussions You Might Find Interesting
1. Programming
Is anybody know sites with the listings of simple programs for Linux (in text mode) (0 Replies)
Discussion started by: Studenttt
0 Replies
2. Post Here to Contact Site Administrators and Moderators
The flash you have placed in the header of the site is really really cool.. But it makes your machine lag, and its really big for ppl connecting with low speeds..
And thinking that you know this already, why dont you just make it a bit smaller? (5 Replies)
Discussion started by: binary_w0lf
5 Replies
3. UNIX for Dummies Questions & Answers
iam going to study for mcse , ccna and ocp in my next couple of month and i was looking for sites with package deals .... i came across hotcerts.com . anyone knows how good is their $85 all exams package and is it worth it ???? . looking for ur responses (0 Replies)
Discussion started by: kelipukal
0 Replies
4. Shell Programming and Scripting
I have 5 public websites (2 different datacenters)
1. production datacenter
2. Backup datacenter.
I have a global site selector which will load balance the site based on availability and load. I would like to have a script that can tell me exactly where my sites are in 2 columns.
... (2 Replies)
Discussion started by: kmaq7621
2 Replies
5. Red Hat
Hi, I can't view web portal in my intranet from linux RHE, and neither to web application.
My network configuration /etc/sysconfig/network-scripts/fcfg-eth0 is ok, what is happen?, can you help me please. (2 Replies)
Discussion started by: xochitl
2 Replies
LEARN ABOUT PHP
apache_lookup_uri
APACHE_LOOKUP_URI(3) 1 APACHE_LOOKUP_URI(3)
apache_lookup_uri - Perform a partial request for the specified URI and return all info about it
SYNOPSIS
object apache_lookup_uri (string $filename)
DESCRIPTION
This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource.
This function is supported when PHP is installed as an Apache module or by the NSAPI server module in Netscape/iPlanet/SunONE webservers.
PARAMETERS
o $filename
- The filename (URI) that's being requested.
RETURN VALUES
An object of related URI information. The properties of this object are:
ostatus
othe_request
ostatus_line
omethod
ocontent_type
ohandler
ouri
ofilename
opath_info
oargs
oboundary
ono_cache
ono_local_copy
oallowed
osend_bodyct
obytes_sent
obyterange
oclength
ounparsed_uri
omtime
orequest_time
EXAMPLES
Example #1
apache_lookup_uri(3) example
<?php
$info = apache_lookup_uri('index.php?var=value');
print_r($info);
if (file_exists($info->filename)) {
echo 'file exists!';
}
?>
The above example will output something similar to:
stdClass Object
(
[status] => 200
[the_request] => GET /dir/file.php HTTP/1.1
[method] => GET
[mtime] => 0
[clength] => 0
[chunked] => 0
[content_type] => application/x-httpd-php
[no_cache] => 0
[no_local_copy] => 1
[unparsed_uri] => /dir/index.php?var=value
[uri] => /dir/index.php
[filename] => /home/htdocs/dir/index.php
[args] => var=value
[allowed] => 0
[sent_bodyct] => 0
[bytes_sent] => 0
[request_time] => 1074282764
)
file exists!
PHP Documentation Group APACHE_LOOKUP_URI(3)