Fw: change ? into "slash"

Fw: change ? into "slash"

am 12.04.2007 04:46:14 von bedul

------=_NextPart_000_0023_01C77CE7.68F86F70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


----- Original Message -----=20
From: gunawan=20
To: php-windows@lists.php.net=20
Sent: Thursday, April 12, 2007 8:17 AM
Subject: change ? into 'slash'


if the title is not right.. plz reply to me with the right title.

i see on mambo site where the site manage to change ? into /
how to make that? are from the skrip or from the configuration?

thx 4 reading.
fyi.. i'm indonesian

------=_NextPart_000_0023_01C77CE7.68F86F70--

Re: Fw: change ? into "slash"

am 12.04.2007 08:26:27 von php

Is this what you mean?

www.server.com/index.php?pageid=123
becomes
www.server.com/index.php/123


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".

Hope this gets you on your way.

Mike


bedul skrev:
> ----- Original Message -----
> From: gunawan
> To: php-windows@lists.php.net
> Sent: Thursday, April 12, 2007 8:17 AM
> Subject: change ? into 'slash'
>
>
> if the title is not right.. plz reply to me with the right title.
>
> i see on mambo site where the site manage to change ? into /
> how to make that? are from the skrip or from the configuration?
>
> thx 4 reading.
> fyi.. i'm indonesian
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fw: change ? into "slash" (solved but need more light)

am 12.04.2007 09:22:11 von bedul

nothing less.. that a correct.
----- Original Message -----
From: "Mikael Grön"
To:
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

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php