I have the following RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^view-image/(.*)$ index.php?page=view-image&image=$1 [L] RewriteRule ^(.*)$ index.php?page=$1 [L] What I am trying to achieve here is to rewrite anything like index.php?page=page to /page index.php?page=second to /second That part works But when I try to rewrite index.php?page=view-image&image=image_title to /view-image/imag_name it doesn't work Any suggestions?
If you want to rewrite for example: yourdomain.com/index.php?text to yourdomain.com/text/ you should use this: RewriteEngine On RewriteRule ^([^/]*)/$ /index.php?page=$1 [L] It should work. EDIT: I've just seen that you have same thing (sorry I'm a bit tired), I'm going to check on other part and edit my post ASAP. And this should work for other part: