
RewriteEngine On
RewriteBase /www/carpeta/
#Rewritecond %{SCRIPT_FILENAME} ^documents/index\.php\?(.*)
#RewriteRule ^$ documents/index.php?attach=$1conindex [L]
#Rewritecond %{SCRIPT_FILENAME} !^documents/index\.php\?.*
#If the user is connect, that's the way
RewriteRule ^([0-9A-Za-z]{32})/(.*)$ $2 [QSA]
#If the user is not connected, no have session, but use a program
RewriteRule ^(.*)\.(.*)\.html$ $2.php?label=$1 [QSA]
RewriteRule ^/(.*)\.(.*)\.html$ $2.php?label=$1 [QSA]
#RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^intranet/(.*)\.html$ intranet/index.php?label=$1 [QSA]
#Only with index.php program the documents can be see
RewriteRule ^documents/index\.php\?(.*) documents/index.php?idAttach=$1 [L]
RewriteRule ^documents/(.*)$ documents/index.php?idAttach=$1 [QSA]
RewriteRule ^(.*)\.html$ index.php?label=$1 [QSA]
php_value session.use_cookies Off