pdurbin/philbot/master/cgi/.htaccess - Htaccess File

pdurbin/philbot/master/cgi/.htaccess

Options +ExecCGI
AddHandler cgi-script .pl

DirectoryIndex index.pl
RewriteEngine on

RewriteRule ^[.] - [F]
RewriteRule .conf - [F]

RewriteCond %{HTTP_REQUEST} !^search
RewriteRule ^([^/]+)/$ /channel-index.pl?channel=$1 [L]

RewriteCond %{HTTP_REQUEST} !^search
RewriteRule ^([w_-]+)/?$ /channel-index.pl?channel=$1 [L]

RewriteCond %{HTTP_REQUEST} !^search
RewriteRule ^([^/]+)/today$ out.pl?channel=$1

RewriteCond %{HTTP_REQUEST} !^search
RewriteRule ^([^/]+)/yesterday$ out.pl?channel=$1;date=yesterday

RewriteCond %{QUERY_STRING} ^channel=([^;]+);date=(dddd-dd-dd)
RewriteCond %{HTTP_REQUEST} ^out.pl
RewriteRule ^out.pl /%1/%2? [R=301,L]

RewriteCond %{HTTP_REQUEST} !^search
RewriteRule ^([^/]+)/(dddd-dd-dd)  out.pl?channel=$1;date=$2 [L]

RewriteRule ^search/?$ /search.pl
RewriteRule ^search/(d+)/(.*)$  /search.pl?offset=$1;q=$2
RewriteRule ^search/(.*)$  /search.pl?offset=0;q=$2

On Github License

Files

Download PDF of Htaccess file
HTTP_REQUEST, QUERY_STRING

Comments

Apache