openaustralia/publicwhip-matthew/master/website/.htaccess - Htaccess File

openaustralia/publicwhip-matthew/master/website/.htaccess

# .htaccess file 

<FilesMatch "^(mp-info.xml|dreamquery.xml|mpdream-info.xml)$">
    AddType application/x-httpd-php .xml
</FilesMatch>
Options ExecCGI
DirectoryIndex index.php

# make things safe
#php_flag register_globals off # doesn't work / not needed for PHP5
<Files ~ ".inc$">
    Order allow,deny
    Deny from all
</Files>

# all links on publicwhip.org.uk are permalinks
# this lets us move pages without breaking them
RedirectPermanent /rebels.php /mps.php?sort=rebellions
RedirectPermanent /news.php /newsletters/archive.php
RedirectPermanent /code.php /project/code.php
RedirectPermanent /mp-info.xml /feeds/mp-info.xml
RedirectPermanent /dreammp.php /policy.php

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^testrewrite$ /index.php [PT]
RewriteRule ^[Nn]/([^;]+)$                      /newsletters/signup.php?token=$1
RewriteRule ^[Uu]/([^;]+)$                      /newsletters/signup.php?token=$1&unsub=1
RewriteRule ^byelection$ /election_glenrothes2008.php [PT]
RewriteRule ^by-election$ /election_glenrothes2008.php?dash=yes [PT]
RewriteRule ^fortytwodays$ /fortytwodays.php [PT]

# Net strike
#RewriteCond %{REQUEST_URI} !^/patents/patents.php
#RewriteCond %{REQUEST_URI} !^/thepublicwhip.gif
#RewriteCond %{REQUEST_URI} !^/publicwhip.css
#RewriteCond %{REQUEST_URI} !^/mp-info.xml
#RewriteRule .*          http://www.publicwhip.org.uk/patents/patents.php [R=302,L]

# Alternative way of net striking:
#RedirectMatch /[^p] http://www.publicwhip.org.uk/patents/patents.php

On Github License

Files

Download PDF of Htaccess file
REQUEST_URI

Comments

Apache