php - Need assistance making .htaccess more strict -


i looking assistance in making .htaccess file point requests index.php file, regardless of if file exists or not. currently, requests sent index.php unless file exists in directory, not want, nor secure.

here current .htaccess:

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

let me know if have pointers or resources. thank you

you can use:

rewriteengine on rewritecond $1 !^(index\.php|robots\.txt) rewriterule ^(.+)$ index.php?path=$1 [l,qsa] 

if need real path in path parameter


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

Delphi 7 and decode UTF-8 base64 -