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

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -