3
Contributors
4
Replies
13
Views
3 Years
Discussion Span
Last Post by amith_ami
1

Hope this helps :)

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ cms.php?cms_id=$1 [L,QSA]
0

Just for your information: you can also use PHP to read your URL. Say your .htaccess is like this:

RewriteEngine on

Options -Indexes

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

Everything is redirected to index.php. In index.php, you can use $_SERVER['REQUEST_URI'], for example, to parse the URL and load the file you wish to load.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.