Htaccess File

wigii/wigii/master/www/example.htaccess

DOCUMENT_ROOT, HTTP_HOST, REQUEST_URI, SCRIPT_FILENAME, SERVER_NAME
################################## Errors ######################################
#ErrorDocument 301 /error/301-moved_permanently.html
#ErrorDocument 302 /error/302-moved_temporarily.html
#ErrorDocument 303 /error/303-see_other.html
#ErrorDocument 400 /error/400-bad_request.html
ErrorDocument 401 /error/401-authorization_required.html
#ErrorDocument 402 /error/402-payment_required.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-not_found.html
#ErrorDocument 405 /error/405-method_not_allowed.html
#ErrorDocument 406 /error/406-not_acceptable.html
#ErrorDocument 407 /error/407-proxy_authentication_required.html
ErrorDocument 408 /error/408-request_timed_out.html
#ErrorDocument 409 /error/409-conflicting_request.html
#ErrorDocument 410 /error/410-gone.html
#ErrorDocument 411 /error/411-content_length_required.html
#ErrorDocument 412 /error/412-precondition_failed.html
#ErrorDocument 413 /error/413-request_entity_too_long.html
#ErrorDocument 414 /error/414-request_uri_too_long.html
#ErrorDocument 415 /error/415-unsupported_media_type.html
ErrorDocument 500 /error/500-internal_server_error.html
#ErrorDocument 501 /error/501-not_implemented.html
#ErrorDocument 502 /error/502-bad_gateway.html
ErrorDocument 503 /error/503-service_unavailable.html
#ErrorDocument 504 /error/504-gateway_timeout.html
#ErrorDocument 505 /error/505-http_version_not_supported.html
################################################################################

######################### Howto map /~user to /user ############################
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/([^/]+)$
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^([^/]+)$ http://%{HTTP_HOST}/$1/ [R,L]
RewriteCond %{REQUEST_URI} ^/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^([^/]+)(.+)$ /~$1/$2
################################################################################

###################### Howto map /users/user to /users/user ####################
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/users/([^/]+)$
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^users/([^/]+)$ http://%{HTTP_HOST}/users/$1/ [R,L]
RewriteCond %{REQUEST_URI} ^/users/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^users/([^/]+)(.+)$ /~$1/$2
################################################################################

php_value session.gc_maxlifetime 10800
php_value session.save_path '../tmp/'
php_flag display_errors on
php_flag display_startup_errors on
php_flag html_errors on
php_flag log_errors off
php_flag track_errors on
php_value error_reporting 30711

AddType application/x-httpd-php .html
Options +FollowSymlinks -Indexes

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^.*wigii/.*$
RewriteRule ^modif/(.*)$ /wigii/indexModif.php?url=$1 [L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^.*wigii/.*$
RewriteRule ^(.*)$ /wigii/index.php?url=$1 [L]

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^.*example/.*$
RewriteRule ^modif/(.*)$ /example/indexModif.php?url=$1 [L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^.*example/.*$
RewriteRule ^(.*)$ /example/index.php?url=$1 [L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^.*/.*$
RewriteRule ^modif/(.*)$ /indexModif.php?url=$1 [L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^.*/.*$
RewriteRule ^(.*)$ /index.php?url=$1 [L]
Exit mobile version