mmc98dl1
asked on
search engine friendly url's
Hi,
I am looking at ways of converting URL's to be search engine friendly.
now I know that in cold fusion and asp you can use a / instead of a ? in between your file and passed variables.
This IS possible on IIS 5 + CF and ASP, but I cant find a way to do it with PHP on IIS 5. Can anybody help?
Thanks
I am looking at ways of converting URL's to be search engine friendly.
now I know that in cold fusion and asp you can use a / instead of a ? in between your file and passed variables.
This IS possible on IIS 5 + CF and ASP, but I cant find a way to do it with PHP on IIS 5. Can anybody help?
Thanks
ASKER
iis wont do this. we tested this IIS takes test.php as a directory name then looks for testdirectory and the file called index.php in there.
this means you need directories or virtuals.
we kinda thought it would work too - alas not.
this means you need directories or virtuals.
we kinda thought it would work too - alas not.
ASKER
andriv - this is the kind of thing I have seen already. fundamentally has the same problem, IIS always goes all the way to the end of the url - if there is no folder or file there it throw the 404.
this means that the first bit back to the SE is an HTTP 404 - not 200 OK. So the user will get a nice result as the 404 can process the page and give em the nice result they were after, but the SE gets 404 and thats not a good thing.
this means that the first bit back to the SE is an HTTP 404 - not 200 OK. So the user will get a nice result as the 404 can process the page and give em the nice result they were after, but the SE gets 404 and thats not a good thing.
with Apache you have mod_rewrite which allows you to rewrite URLs. Maybe a same system works for IIS.
ASKER
interesting, we havent seen it yet, but i dont think the big M would have thought about something like that do you?
ASKER
us111 - works for asp. not php.
thanks anyway.
thanks anyway.
ASKER
we have actually found an answer for this - do I need to post it?
What do I do with the question if noone answered it? do I delete it?
What do I do with the question if noone answered it? do I delete it?
yes post it. it could be useful.
ask the EE community to PAQ the question & give it back to your points
ask the EE community to PAQ the question & give it back to your points
ASKER
if(isset($_SERVER['QUERY_S TRING'])) {
$_GET['path'] = "/" . ereg_replace("404;" . DI_HOST_NAME . "/", "", $_SERVER['QUERY_STRING']);
if(substr($_GET['path'], strlen($_GET['path'])-1) == "/")
$_GET['path'] = substr($_GET['path'],0,str len($_GET[ 'path'])-1 );
}
this gets the query string if there is one.
and we use IIS - the 404 is the php script that retreives the page from the DB, so basically feed the new URL to the 404.
$_GET['path'] = "/" . ereg_replace("404;" . DI_HOST_NAME . "/", "", $_SERVER['QUERY_STRING']);
if(substr($_GET['path'], strlen($_GET['path'])-1) == "/")
$_GET['path'] = substr($_GET['path'],0,str
}
this gets the query string if there is one.
and we use IIS - the 404 is the php script that retreives the page from the DB, so basically feed the new URL to the 404.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.sddsdd.com/test.php/testdirectory/index.php
then print $QUERY_STRING