.htaccess - htaccess - Exception when no file is specified -


i'm trying make .htaccess www.domain.com/?get=1234 gets rewritten www.domain.com/1234 , exceptions files such style.css, logo.png, etc.

this works great files can't figure out how make exception www.domain.com/ directory index.php file, , putting index.php exception forces user include index.php in url ofcourse don't like.

thanks in advance. .htaccess far:

rewriteengine on  # exceptions  rewritecond %{request_uri} !/favicon.ico rewritecond %{request_uri} !/index.php rewritecond %{request_uri} !/style.css rewritecond %{request_uri} !/logo.png  # rewriting  rewriterule ^([^/]*)$ /?get=$1 [l]  # www rewriting  rewritecond %{http_host} !^www\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l] 

if want rewrite everything, excluding real files , directories, can use these 2 rewriteconds exception guards

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -