Forum Moderators: phranque

Message Too Old, No Replies

sending a query string without specifying a file.

how is it done.

         

mack

12:30 am on Sep 20, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I noticed this on Google but is is not something that is Google specific, that is why I posted this here.

If you carry out a search in google the query string for a search for "foo" will look something like this.....

google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=foo

When you look at that string the query is not being pointed to any specific file but to a directory "/search" how is this done? is this some form of redirect that google is using or is there a default file within that dir to handle all requests?

Mack.

claus

12:42 am on Sep 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is that "search" is in fact a file. A script, just without a file extension. If it was a directory the search string would look like this in stead:

google.com/search/?hl=en&ie=UTF-8&oe=UTF-8&q=foo

Try entering it as a directory path name and you will get a 404 (at least i just did):

www.google.com/search/

/claus

mack

2:09 am on Sep 20, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



ahhhhhh i see.
search/ gives a 404 whereas search resolves to a google search page.

Any tips on how this would be possible on a linux server :)

Mack.

TGecho

2:54 pm on Sep 20, 2003 (gmt 0)

10+ Year Member



Put this in your/an .htaccess

<Files search>
ForceType application/x-httpd-php
</Files>

This will treat the file named "search" as a php doc.

mack

3:16 pm on Sep 20, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Nice one cheers :)

Mack.