Файл: apwa/.htaccess
Строк: 131
# Lines That should already be in your .htacess
# With Apache 2.4 the
"Order, Deny" syntax has been deprecated and moved from
# module
mod_authz_host to a new module called mod_access_compat (which may be
#
disabled) and a new "Require" syntax has been introduced to
mod_authz_host.
# We could just conditionally provide both versions, but
unfortunately Apache
# does not explicitly tell us its version if the
module mod_version is not
# available. In this case, we check for the
availability of module
# mod_authz_core (which should be on 2.4 or higher
only) as a best guess.
<IfModule mod_version.c>
<IfVersion <
2.4>
<Files "config.php">
Order Allow,Deny
Deny from
All
</Files>
<Files "common.php">
Order
Allow,Deny
Deny from All
</Files>
</IfVersion>
<IfVersion
>= 2.4>
<Files "config.php">
Require all
denied
</Files>
<Files "common.php">
Require
all
denied
</Files>
</IfVersion>
</IfModule>
<IfModule
!mod_version.c>
<IfModule !mod_authz_core.c>
<Files
"config.php">
Order Allow,Deny
Deny from
All
</Files>
<Files "common.php">
Order
Allow,Deny
Deny from
All
</Files>
</IfModule>
<IfModule
mod_authz_core.c>
<Files "config.php">
Require all
denied
</Files>
<Files "common.php">
Require
all denied
</Files>
</IfModule>
</IfModule>
# You may
need to un-comment the following lines
# Options +FollowSymlinks
# To make
sure that rewritten dir or file (/|.html) will not load dir.php in case it
exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE
ONCE
RewriteEngine On
# Uncomment the statement below if you want to make
use of
# HTTP authentication and it does not already work.
# This could be
required if you are for example using PHP via Apache CGI.
# RewriteRule .*
- [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# REWRITE BASE
RewriteBase
/
# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond
%{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule
. - [L]
#####################################################
# PHPBB SEO
REWRITE RULES ALL
MODES
#####################################################
# AUTHOR : dcz
www.phpbb-seo.com
# STARTED : 01/2006
#################################
#
FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^forum\.html$
/index.php [QSA,L,NC]
# FORUM ALL MODES
RewriteRule
^(forum|[a-z0-9_-]*-f)([0-9]+)(-([0-9]+))?\.html$
/viewforum.php?f=$2&start=$4 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER ALL
MODES
RewriteRule
^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$
/viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
# TOPIC WITHOUT FORUM
ID & DELIM ALL MODES
RewriteRule
^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$
/viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
# PHPBB FILES
ALL MODES
RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$
/download/file.php?id=$2&t=$1 [QSA,L,NC]
# PROFILES THROUGH
USERNAME
RewriteRule ^member/([^/]+)/?$
/memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES
THROUGH USERNAME
RewriteRule
^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$
/search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ALL
MODES
RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$
/memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
#
POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
#
ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$
/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
#
UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$
/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
#
NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$
/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
#
UNREAD POSTS
RewriteRule ^unreadposts(-([0-9]+))?\.html$
/search.php?search_id=unreadposts&start=$2 [QSA,L,NC]
# THE
TEAM
RewriteRule ^the-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
#
HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES
# FORUM
WITHOUT ID & DELIM ALL MODES
# THESE FOUR LINES MUST BE LOCATED AT THE
END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME}
!-f
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$
/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond
%{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9_-]+)\.html$
/viewforum.php?forum_uri=$1 [QSA,L,NC]
# FIX RELATIVE PATHS :
FILES
RewriteRule
^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /$1
[QSA,L,NC,R=301]
# FIX RELATIVE PATHS : IMAGES
RewriteRule
^.+/(styles/.*|images/.*)/$ /$1 [QSA,L,NC,R=301]
# END PHPBB
PAGES
#####################################################
# ALBUM SEO
MOD
RewriteCond %{REQUEST_URI} gallery/(.*)_a([0-9]+).html
RewriteRule (.*)
gallery/album.php?album_id=%2 [L]
RewriteCond %{REQUEST_URI}
gallery/(.*)_p([0-9]+).html
RewriteRule (.*)
gallery/image_page.php?image_id=%2 [L]
RewriteCond %{REQUEST_URI}
gallery/album([0-9]+)-([a-zA-Z]*)-([a-zA-Z0-9]*)-([0-9]*)-([0-9]*).html
RewriteRule
(.*)
gallery/album.php?album_id=%1&sk=%2&sd=%3&st=%4&start=%5
[L]
RewriteCond %{REQUEST_URI}
gallery/album([0-9]+)-([a-zA-Z]*)-([a-zA-Z0-9]*)-([0-9]*).html
RewriteRule
(.*) gallery/album.php?album_id=%1&sk=%2&sd=%3&st=%4
[L]
RewriteCond %{REQUEST_URI}
gallery/album([0-9]+)-([0-9]*).html
RewriteRule (.*)
gallery/album.php?album_id=%1&start=%2 [L]
RewriteCond %{REQUEST_URI}
gallery/album([0-9]+).html
RewriteRule (.*) gallery/album.php?album_id=%1
[L]
RewriteCond %{REQUEST_URI} gallery/page([0-9]+).html
RewriteRule (.*)
gallery/image_page.php?image_id=%1 [L]
RewriteCond %{REQUEST_URI}
gallery/page([0-9]+)-([0-9]+)-([a-zA-Z]+)-([a-zA-Z0-9]*)-([0-9]+).html
RewriteRule
(.*)
gallery/image_page.php?album_id=%1&image_id=%2&sk=%3&sd=%4&st=%5
[L]
RewriteCond %{REQUEST_URI} gallery/images/([0-9]+)
RewriteRule (.*)
gallery/image.php?image_id=%1 [L]
RewriteCond %{REQUEST_URI}
gallery/thumbs/([0-9]+)
RewriteRule (.*)
gallery/image.php?mode=thumbnail&image_id=%1 [L]
RewriteCond
%{REQUEST_URI} gallery/medium/([0-9]+)
RewriteRule (.*)
gallery/image.php?mode=medium&image_id=%1 [L]
RewriteCond
%{REQUEST_URI} gallery/images/(.*)_([0-9]+)
RewriteRule (.*)
gallery/image.php?image_id=%2&view=no_count [L]
RewriteRule
^thumb/.*_(\d+)\.(gif|jpg|jpeg|bmp|png|tiff|tif|tga)$
download/file.php?id=$1&t=1 [NC]
RewriteRule
^pic/.*_(\d+)\.(gif|jpg|jpeg|bmp|png|tiff|tif|tga)$
download/file.php?id=$1&mode=view [NC]
RewriteRule
^small/.*_(\d+)\.(gif|jpg|jpeg|bmp|png|tiff|tif|tga)$
download/file.php?id=$1 [NC]
RewriteRule
^img/.*_(\d+)\.(gif|jpg|jpeg|bmp|png|tiff|tif|tga)$ download/file.php?id=$1
[NC]
# 301 REDIRECTS
RewriteCond %{THE_REQUEST} /post([^d]+)\.xhtml\
HTTP/
RewriteRule (.*) /post%1.html? [R=301,L]
RewriteCond %{THE_REQUEST}
/post([^d]+)\.xhtml#([^d]+)\ HTTP/
RewriteRule (.*) /post%1.html#p%2?
[R=301,L]
RewriteCond %{THE_REQUEST} /topic([^d]+)\.xhtml\
HTTP/
RewriteRule (.*) /topic%1.html? [R=301,L]
# 301 REDIRECTS
GALLERY
RewriteCond %{THE_REQUEST}
/gallery/album\.php\?album_id=([0-9]+)&sk=([a-zA-Z]+)&sd=([a-zA-Z0-9]*)&st=([0-9]+)\
HTTP/
RewriteRule (.*) /gallery/album%1-%2-%3-%4.html?
[R=301,L]
RewriteCond %{THE_REQUEST}
/gallery/album\.php\?album_id=([0-9]+)&sk=([a-zA-Z]+)&sd=([a-zA-Z0-9]*)&st=([^d]+)&start=([0-9]+)\
HTTP/
RewriteRule (.*) /gallery/album%1-%2-%3-%4-%5.html?
[R=301,L]
RewriteCond %{THE_REQUEST}
/gallery/image_page\.php\?album_id=([0-9]+)&image_id=([0-9]+)&sk=([a-zA-Z]+)&sd=([a-zA-Z0-9]*)&st=([0-9]+)\
HTTP/
RewriteRule (.*) /gallery/page%1-%2-%3-%4-%5.html?
[R=301,L]
RewriteCond %{THE_REQUEST}
/gallery/image_page\.php\?image_id=([0-9]+)\ HTTP/
RewriteRule (.*)
/gallery/page%1.html? [R=301,L]
RewriteCond %{THE_REQUEST}
/gallery/image_page\.php\?album_id=([0-9]+)&image_id=([0-9]+)\
HTTP/
RewriteRule (.*) /gallery/page%2.html? [R=301,L]
RewriteCond
%{THE_REQUEST} /gallery/album\.php\?album_id=([0-9]+)&start=([0-9]+)\
HTTP/
RewriteRule (.*) /gallery/album%1-%2.html? [R=301,L]
RewriteCond
%{THE_REQUEST} /gallery/album\.php\?album_id=([0-9]+)\ HTTP/
RewriteRule
(.*) /gallery/album%1.html? [R=301,L]
RewriteCond %{REQUEST_FILENAME}
robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
ErrorDocument 404
/errors.php
DirectoryIndex forum.php index.php index.html index.htm
index.wml