PHP Classes

File: public/.htaccess

Recommend this page to a friend!
  Classes of Till Wehowski   PHP RDAP Server   public/.htaccess   Download  
File: public/.htaccess
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP RDAP Server
Process RDAP queries about an IP address or domain
Author: By
Last change:
Date: 6 months ago
Size: 1,200 bytes
 

Contents

Class file image Download
<IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On # Determine the RewriteBase automatically and set it as environment variable. RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ RewriteRule ^(.*) - [E=BASE:%1] # Set the HTTP_AUTHORIZATION header removed by apache as environment variable. RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect to URI without front controller to prevent duplicate content. # We only do this redirect on the initial rewrite to prevent endless redirect loops. RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] # If the requested filename exists or should exist, simply serve it. RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_URI} =/favicon.ico [OR] RewriteCond %{REQUEST_URI} =/robots.txt [OR] RewriteCond %{REQUEST_URI} =/index.html RewriteRule .? - [L] # Rewrite all other queries to the front controller. RewriteRule .? %{ENV:BASE}/index.php [QSA,L] </IfModule>