apache - HTAccess redirect of base folder -


just sense check. have

domain.com/username want redirect php query string, im doing using:

options +followsymlinks rewriteengine on rewriterule ^([^/]*)/([^/]*)\.html$ /profile/display.php?id=$1&function=$2 [l] 

however, have folders, domain.com/about not redirected. how can achieve that? possible, or regex on ride start?

you can use:

options +followsymlinks rewriteengine on rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule ^([^/]+)/([^/]+)\.html$ /profile/display.php?id=$1&function=$2 [l] 

without redirection real directory or real file.


Comments