po/tools/sample_apache.conf

56 lines
2.3 KiB
Plaintext

# Uncomment this if you want to avoid futzing with document roots
# And stuff like that. Make sure you fix up the paths, and the trailing
# slash is important!
#Alias /po/ "/var/www/po/src/"
# Fix up path to match your installation directory
<Directory /var/www/po/src >
# have the web server compress these files by default
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/x-javascript
# And explicitly exclude images from being compressed.
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI image.display.php no-gzip dont-vary
# Let the web server semi-intelligently manage static content
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/x-javascript A2592000
# Disable etag generation for static content.
FileEtag none
<IfModule mod_rewrite.c>
RewriteEngine on
# set this to the Base path!
RewriteBase /po
RewriteRule ^tags search.tags.php [L,QSA]
RewriteRule ^tag/(.*)$ search.tags.php?keyword=$1&only_masters=true [L,QSA]
RewriteRule ^photo/([0-9]+):([0-9]+):([0-9]+)$ photo.php?photo=$1&ver=$2&size=$3 [L,QSA]
RewriteRule ^photo/([0-9]+):([0-9]+)$ photo.php?photo=$1&ver=$2 [L,QSA]
RewriteRule ^photo/([0-9]+)$ photo.php?photo=$1 [L,QSA]
RewriteRule ^photo/:([0-9]+):([0-9]+)$ photo.php?ver=$1&size=$2 [L,QSA]
RewriteRule ^photo/:([0-9]+)$ photo.php?ver=$1 [L,QSA]
RewriteRule ^image/(.*)(\.(jpg|png|jpeg|gif)) image/$1 [QSA]
RewriteRule ^image/([0-9]+):([0-9]+):([0-9]+)$ image.display.php?image=$1&ver=$2&size=$3 [L,QSA]
RewriteRule ^image/([0-9]+):([0-9]+)$ image.display.php?image=$1&ver=$2 [L,QSA]
RewriteRule ^image/([0-9]+)$ image.display.php?image=$1 [L,QSA]
RewriteRule ^image/:([0-9]+):([0-9]+)$ image.display.php?ver=$1&size=$2 [L,QSA]
RewriteRule ^image/:([0-9]+)$ image.display.php?ver=$1 [L,QSA]
RewriteRule ^folders/(.*)$ search.folder.php?search_string=$1&current_user=all [L,QSA]
RewriteRule ^albums/(.*)$ search.folder.php?search_string=$1&current_user=all [L,QSA]
RewriteRule ^user/([0-9a-zA-Z_]+)$ user.php?user=$1 [L,QSA]
RewriteRule ^([a-z]+)/([0-9]+)$ $1.php?$1=$2 [L,QSA]
RewriteRule ^users user.php [L,QSA]
</IfModule>
</Directory>