Mod Rewrite – Clean URL with query string not working – Apache
I have the following .htaccess file. <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On DirectoryIndex api.php FallbackResource index.php RewriteCond %{REQUEST_URI} ^/api RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{QUERY_STRING} ^$ RewriteRule ^/([^/]+)/([^/]+)$ $1/$1.php?endpoint=$2 [L] RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ $1/$1.php?endpoint=$2&id=$3 [L] RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)$ $1/$1.php?endpoint=$2&id=$3&endpoint2=$4 [L]…