#with frontend_dev.php # we skip all files with .something except .html RewriteCond URL /askeet/frontend_dev.php/.*\..+$ RewriteCond URL (?!/askeet/frontend_dev.php/.*\.html$).* RewriteRule /askeet/frontend_dev.php/(.*) /askeet/frontend_dev.php/$1 [L] # we keep the .php files unchanged RewriteRule /askeet/frontend_dev.php/(.*\.php)(.*) /askeet/frontend_dev.php/$1$2 [L] # finally we redirect to our front web controller RewriteRule /askeet/frontend_dev.php/(.*) /askeet/frontend_dev.php [L] #with index.php # we skip all files with .something except .html RewriteCond URL /askeet/.*\..+$ RewriteCond URL (?!/askeet/.*\.html$).* RewriteRule /askeet/(.*) /askeet/$1 [L] # we keep the .php files unchanged RewriteRule /askeet/(.*\.php)(.*) /askeet/$1$2 [L] # finally we redirect to our front web controller RewriteRule /askeet/(.*) /askeet/index.php [L]