I need a bit of help with url rewriting. I have a couple possible url formats site.com/Pages/Edit/1 site.com/Pages/List I have the following .htaccess file Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / # If requested resource does not exist as a file RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/(.*) index.php?controller=$1&action=$2 </IfModule> # big crash from our front web controller ErrorDocument 500 "<h2>Application error</h2>website failed to start properly" Code (markup): this file works great for site.com/Pages/List style urls but fail for site.com/Pages/Edit/1 What I want is site.com/{1}/{2}/{3} where it translates to site.com/index.php?controller={1}&action={2}&value={3} Can someone help me out? Thanks.
Some scripts use this trick : they let index.php capture the page name, and do a PHP or MySQL processing about finding the real link (for instance, the WordPress script).