htaccess with rewrite

Discussion in 'PHP' started by Gizlen, Jan 4, 2010.

  1. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Yes, although they don't pass the URI using the method of index.php?uri=$1 for example, because you can get it within PHP anyway using $_SERVER['REQUEST_URI']. Here's the one for WP
    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    Code (markup):
    It's the same basic principle, only they don't send the URI

    Edit: This is common practice with pretty much all CMS's, MVC's etc
     
    JAY6390, Jan 4, 2010 IP