Re: URL rewrite help?
| From: | Jason Wong | Date: | Fri, 11 Apr 2003 19:41:09 +0000 |
| Subject: | Re: URL rewrite help? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27027@lists.php.net to get a copy of this message | ||
On Saturday 12 April 2003 01:10, Aaron Wolski wrote:
> I assumed what I was asking what pretty straight forwarded.
>
>
> URL rewriting means taking a dynamic URL that looks like:
> http://www.domain.com/script.php?action=form&fid=319016
>
> To something that looks like:
>
> http://www.domain.com/319016.htm
>
> Rewriting the URL to remove all query strings and extraneous code so
> that is looks like a static URL thus making is more crawlable.
1) Simple solution (does not require configuration of webserver)
A URL which looks like:
http://www.domain.com/script.php/something/or/another
will be processed by script.php and you can use $_SERVER["REQUEST_URI"] or
maybe $_SERVER["PATH_INFO"] to extract the "/something/or/another" portion.
2) More involved solution
This is only required if you want your URL to look like:
http://www.domain.com/script/something/or/another
In httpd.conf or similar
<Location /script>
ForceType application/x-httpd-php
</Location>
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
The life which is unexamined is not worth living.
-- Plato
*/