Forum Moderators: coopster
cannot match anything within the query url?
so [domain.com...]
will return yahooo
why doesnt this work?
the url is present and changes accordingly :)
yes its actually a query using a template. I am modifying the header, the "google.html" is one of the URLs in the script.
I'm still not sure what does that mean, but my understanding is that "google" should be present in the browser request not your internal server redirect/rewrite URL you setup in a script!
so if I use
<?php
if (stripos ('post', $_SERVER['REQUEST_URI']) === true) {
echo "I wish I could see this";
} elseif (stripos ('post', $_SERVER['QUERY_STRING']) === true) {
echo "I wish I could see this";
} else {
echo "hello from Microsoft";
}
?>
when the "post-id=" (which is now static "post-")page is requested, I would like it to print slightly different header info.
here is live header output
if (stripos ($_SERVER['REQUEST_URI'], 'post') [b]!== FALSE[/b]) {
update your code with that and try it.
[edited by: eelixduppy at 3:25 pm (utc) on Jan. 10, 2009]
wildbest has been a saint! very helpful! (thank you wildbest)
now unfortunately.. it still didnt work :(
<?php
if (stripos ('post', $_SERVER['REQUEST_URI']) !== FALSE) {
echo "wanna see this";
} else {
echo "hello from microsoft";
}
?>
is my code,
thnx! regards, frogz
('post', $_SERVER['REQUEST_URI'])
You have to switch these...
($_SERVER['REQUEST_URI'], 'post')
The one you suggested would work. We can't be sure how frogz changed the pattern for his own needs, switching it from 'google' to something else. Especially if he left an unescaped character in there it would have changed he pattern completely.
Glad everything is sorted now, though. :)
Again, thank you for your persistence in this matter wildbest, This provided me a solution to a problem I have been working with for a while now.
regards, frogz