Re: Fw: change ? into 'slash' (solved but need more light)
| From: | bedul | Date: | Thu, 12 Apr 2007 07:22:11 +0000 |
| Subject: | Re: Fw: change ? into 'slash' (solved but need more light) | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-27675@lists.php.net to get a copy of this message | ||
nothing less.. that a correct.
----- Original Message -----
From: "Mikael Grön" <php@emgee.se>
To: <php-windows@lists.php.net>
Sent: Thursday, April 12, 2007 1:26 PM
Subject: Re: [PHP-WIN] Fw: change ? into 'slash'
> Is this what you mean?
>
> www.server.com/index.php?pageid=123
> becomes
> www.server.com/index.php/123
waw.. that's posible???
>
> It's actually the other way around. When the user browses to
> /index.php/123, the webserver translates that into /index.php?pageid=123
...
> If it's an Apache server, it's done in a .htaccess file located in a
> folder above the stuff you want to change.
> Read here for guides and examples:
> http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
>
> On my own site, I have an index.php file which handles incoming page
> request by a search string. For example:
> Someone goes to:
> www.emgee.se/hem/kontakt.html
>
> my rewrite script, located in the file .htaccess:
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
>
> translates anything written in the URL, except files that actually exist
> on the server to:
> www.emgee.se/index.php?q=hem/kontakt.html
>
> The index.php file gets the $_GET['q']-variable and starts splitting the
> path and finding the pages in the database. In this case it looks for a
> page named "kontakt" which is a child-page of a page named "hem".
??? i don't get what u mention here.. no heart felling, i was talking about
how to do that based what you said above.
but i will read your url first.
thx for your reply.
>
> Hope this gets you on your way.
>
> Mike