[Bb-trac] Re: [bbPress] #882: Create proper front-controller based on mod_rewrite

bbPress bb-trac at lists.bbpress.org
Wed May 28 19:57:59 GMT 2008


#882: Create proper front-controller based on mod_rewrite
-------------------------+--------------------------------------------------
 Reporter:  sambauers    |        Owner:  sambauers         
     Type:  enhancement  |       Status:  new               
 Priority:  normal       |    Milestone:  1.0-beta & XML-RPC
Component:  Back-end     |      Version:  1.0-alpha (trunk) 
 Severity:  normal       |   Resolution:                    
 Keywords:  mod_rewrite  |  
-------------------------+--------------------------------------------------
Comment (by mdawaffe):

 Why the object parameter?  Why not

  * !http://example.com/?topic=1
  * !http://example.com/?topic=first-post
  * !http://example.com/topic/1
  * !http://example.com/topic/frist-post

 It's more flexible since it would allow us to do ?forum=my-great-
 forum&tag=blue, which you can't do with the structure you proposed above.

 How were you planning on supporting those pretty URLs without mod_rewrite
 or stub pages?

 The way it's usually done with mod_rewrite is the following.

 {{{
 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /path/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /path/index.php [L]
 </IfModule>
 }}}

 In which case you won't need stubs for anything.

 Or with a custom 404 handler (which can be a bit problematic).

-- 
Ticket URL: <http://trac.bbpress.org/ticket/882#comment:3>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list