htaccess: Clean URL e proteggere comunque una sottodirectory
Se usa Clean URL (SEO friendly) e desidera anche proteggere una cartella, ecco cosa inserire nel file .htaccess nella cartella /public_html. In questo esempio tutto ciò che non esiste viene reindirizzato a index.php. La riga con 401.shtml è importante per la directory protetta. 401 è il codice per Autorizzazione richiesta :: Authorization required e deve essere intercettato perché tutto funzioni.
#SEO modification
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(401.shtml)
RewriteRule ^(.*)$ index.php [L,QSA]
