uri/url help
| From: | Kenton P. Kammer | Date: | Sat, 27 Dec 2008 06:02:29 +0000 |
| Subject: | uri/url help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-285083@lists.php.net to get a copy of this message | ||
I'm trying to make something to redirect people to my home page if they some how access my
include pages. For example, I have a generic copyright .htm with links in it that I add to all my
pages with the include(). Problem is when I'm trying to make it the uri is always where it is
in the include folder I made, even when I'm on the home page trying to view the links. This is
what I have:
<?
$uri=$_SERVER["REQUEST_URI"];
if($uri=='/'.strpbrk($uri, 'include')){header("Location:
../index.php");}
else{
?>
<p>page content</p>
<? } ?>
But the error is that since it always returns the /include/...htm uri even when I'm viewing it
on http://www.domain.com/index.php
Help please! Thank you!
_____________________________________________
Kenton P. Kammer
E1: kpkammer@yahoo.com
E2: kkammer@mail.bradley.edu
P: (309)677-1152
C: (708)309-1876
F: (708)263-4424
_____________________________________________