Solved

search engine friendly url's

Posted on 2002-06-18
13
232 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:mmc98dl1
13 Comments
 
LVL 8

Expert Comment

by:us111
ID: 7087404
you can use url like that:
http://www.sddsdd.com/test.php/testdirectory/index.php

then print $QUERY_STRING
0
 
LVL 12

Author Comment

by:mmc98dl1
ID: 7088753
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.
0
 
LVL 5

Expert Comment

by:andriv
ID: 7090462
Take a look at this great article:

http://www.promotionbase.com/article.php?aid=485&pid=0
0
 
LVL 12

Author Comment

by:mmc98dl1
ID: 7092264
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.
0
 
LVL 8

Expert Comment

by:us111
ID: 7092452
with Apache you have mod_rewrite which allows you to rewrite URLs. Maybe a same system works for IIS.
0
 
LVL 12

Author Comment

by:mmc98dl1
ID: 7092535
interesting, we havent seen it yet, but i dont think the big M would have thought about something like that do you?
0
Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 8

Expert Comment

by:us111
ID: 7092562
0
 
LVL 8

Expert Comment

by:us111
ID: 7092564
0
 
LVL 12

Author Comment

by:mmc98dl1
ID: 7219449
us111 - works for asp. not php.

thanks anyway.
0
 
LVL 12

Author Comment

by:mmc98dl1
ID: 7498559
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?
0
 
LVL 8

Expert Comment

by:us111
ID: 7499414
yes post it. it could be useful.

ask the EE community to PAQ the question & give it back to your points
0
 
LVL 12

Author Comment

by:mmc98dl1
ID: 7503026
if(isset($_SERVER['QUERY_STRING'])) {
       $_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,strlen($_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.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7503510
PAQ'd and points refunded as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now