FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Using a single php entry file for a whole site.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Using a single php entry file for a whole site. [message #181867 is a reply to message #181865] Thu, 20 June 2013 19:44 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Am 20.06.2013 21:29, schrieb Marc van Lieshout:
> 1. You don't need apache rewriting you can use $_SERVER['PATH_INFO'] and
> use url's like:
>
> http:/mysite.com/index.php/news/Dog-Bites-Man
>
> or a page controller:
>
> http:/mysite.com/index.php?site=%2Fnews%2FDog-Bites-Man

Or one can use mod_rewrite to rewrite

http://example.com/news/dog-bites-man

to

http://example.com/?page=news/dog-bites-man

This way one can simply use $_GET['page'] instead of dissecting
$_SERVER['REQUEST_URI'] and still have "clean URLs".

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Updating old PHP code
Next Topic: Komodo Edit
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 01:07:28 GMT 2024

Total time taken to generate the page: 0.04027 seconds