How to redirect folders to index.php using .htaccess? -


folder structure:

/index/ /upload/ /something/ 

these folders don't have .htaccess in them(and shouldn't).

when accessing http://site.com/something redirects http://site.com/something/url=something, not desired.

rewriteengine on  # rewritebase /base/ #  rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?url=$1 [l,qsa] 

adding rewrite condition appending '/' @ end of folders makes additional(and unnecessary) request, not nice.

how write rule folders sent directly front controller without unwanted redirects?

try adding additional condition exclude existing directories:

rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?url=$1 [l,qsa] 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -