Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am wanting to set up multiple rules, and so the system can be expanded I am wanting to use %{REQUEST_FILENAME} rather than having multiple rules set up.

My structure at the moment is:


So there are multiple base pages (clients.php, memos.php, projects.php, client.php, project.php), and multiple query variables, that can be used in conjunction with one another, so you could have /clients.php?view=1&remove=1&add if you wanted to view a clients details as you remove them, and also have a form onscreen for adding, although generally that won't be done.

Is there a way this can be set up in htaccess, so it looks more like the following


Forgot to mention that currently I am just using the below .htaccess code, to remove .php from the url

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) $1.php [L]
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.