Forum Moderators: phranque
http://example.com/Newsletters/5765-2005.pdf http://example.com/newsletters/5765-2005.pdf http://example.com/articles/letters/5765-2005.pdf http://example.com/newsletters/5765-2005.pdf
AddHandler application/x-httpd-php54s .php
AddHandler server-parsed .html
AddHandler server-parsed .htm
Options +SymLinksIfOwnerMatch
RewriteEngine on
RewriteBase /
ServerSignature Off
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes
# backward compatibility ruleset for rewriting document.htm to document.php
RewriteRule ^(.*)\.htm$ $1 [C,E=WasHTML:yes]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [S=1,R]
RewriteCond %{ENV:WasHTML} ^yes$
RewriteRule ^(.*)$ $1.htm
# Blocks access from libwww-perl user-agents and URLS which include the command "=http:"
RewriteCond %{HTTP_USER_AGENT} libwww [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)=http [NC]
RewriteRule ^(.*)$ - [F,L]
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
# Prevent hotlinking of images
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.org/.*$ [NC]
RewriteRule \.(gif|jpg|swf|flv|png)$ /feed/ [R=302,L]
# Used for the errorpage.php file
ErrorDocument 400 /errorpage.php
ErrorDocument 401 /errorpage.php
ErrorDocument 403 /errorpage.php
ErrorDocument 404 /errorpage.php
ErrorDocument 500 /errorpage.php
# Caching
# ExpiresActive On
# ExpiresDefault A0
<ifModule mod_headers.c>
# 1 YEAR
<filesMatch ".(ico|pdf|flv)$">
Header set Cache-Control "max-age=29030400, public"
</filesMatch>
# 1 WEEK
<filesMatch ".(jpg|jpeg|png|gif|swf|css|js)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
# 2 DAYS
<filesMatch ".(xml|txt)$">
Header set Cache-Control "max-age=172800, proxy-revalidate"
</filesMatch>
# 1 MIN
<filesMatch ".(html|htm|php)$">
Header set Cache-Control "max-age=60, private, proxy-revalidate"
</filesMatch>
</ifModule>
<ifModule mod_expires.c>
# any Expires Directives go here
</ifModule>
# End Caching
# compress text, html, javascript, css, xml:
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/javascript
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
# <IfModule mod_deflate.c>
# AddOutputFilterByType DEFLATE text/plain
# AddOutputFilterByType DEFLATE text/html
# AddOutputFilterByType DEFLATE text/xml
# AddOutputFilterByType DEFLATE text/css
# AddOutputFilterByType DEFLATE application/xml
# AddOutputFilterByType DEFLATE application/xhtml+xml
# AddOutputFilterByType DEFLATE application/rss+xml
# AddOutputFilterByType DEFLATE application/javascript
# AddOutputFilterByType DEFLATE application/x-javascript
# </IfModule>
# <Files 403.shtml>
# order allow,deny
# allow from all
# </Files>
<Files php.ini>
Order allow,deny
Deny from all
</Files>
RewriteRule ^Articles/?(.*)$ http://example.com/articles/$1 [R=301,L]
RewriteRule ^Events/?(.*)$ http://example.com/events/$1 [R=301,L]
RewriteRule ^News/?(.*)$ http://example.com/articles/$1 [R=301,L]
RewriteRule ^Newsletters/?(.*)$ http://example.com/newsletters/$1 [R=301,L]
Options +SymLinksIfOwnerMatch
<snip>
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes
RewriteRule ^News/?(.*)$ http://example.com/articles/$1 [R=301,L]
RewriteRule ^Newsletters/?(.*)$ http://example.com/newsletters/$1 [R=301,L]
blahblah(/.*)?$ blahblah(?:/(.*))?$ The sub-directory "letters" does not exist, nor is it listed in the .htaccess file,
The problem is not in Newsletters. The problem is in the immediately preceding line, News.
RewriteEngine on
Redirect 301 /emet/weekly.xml http://example2.com/
Redirect 301 /rss-info.htm http://example2.com/rss-info.php
Redirect 301 /articles//going/feedback.php http://www.example.com/going/feedback.php
Redirect 301 /cgi-bin/2me_4see_comment.cgi http://www.example.com/contact.php
Redirect 301 /emet/analysis/arab_claim_to_palestine.htm http://example2.com/analysis/arab_claim_to_palestine.php
Redirect 301 /articles/important-jeru.php http://www.example.com/articles/what-is-so-important-about-jerusalem.php
Redirect 301 /articles/important-jeru.htm http://www.example.com/articles/what-is-so-important-about-jerusalem.php
Redirect 301 /articles/histjeru.php http://www.example.com/articles/a-biblical-history-of-jerusalem.php
Redirect 301 /articles/histjeru.htm http://www.example.com/articles/a-biblical-history-of-jerusalem.php
Redirect 301 /articles/jerucov.php http://www.example.com/articles/jerusalem-a-separate-covenant.php
Redirect 301 /articles/jerucov.htm http://www.example.com/articles/jerusalem-a-separate-covenant.php
Redirect 301 /articles/seventhmonth.php http://www.example.com/articles/index.php
Redirect 301 /articles/touch_not_mine_anointed.php http://www.example.com/articles/index.php
Redirect 301 /articles/camel-needle.php http://www.example.com/articles/index.php
Redirect 301 /articles/camel-needle.htm http://www.example.com/articles/index.php
Redirect 301 /bookReviews/review-paul_the_jewish_theologian.php http://www.example.com/books.php
Redirect 301 /articles/spiritual-authority-what-it-is-and-what-it-isnt.php http://www.example.com/articles/index.php
Redirect 301 /articles/godsplan.php http://www.example.com/articles/index.php
Redirect 301 /articles/blessings.php http://www.example.com/articles/index.php
Redirect 301 /articles/fathers_love.php http://www.example.com/articles/index.php
# Redirect 301 /book_reviews/ http://www.example.com/books.php
Redirect 301 /articles/harry_potter.php http://www.example.com/articles/index.php
Redirect 301 /articles/tradmen.php http://www.example.com/articles/index.php
Redirect 301 /articles/pastors.php http://www.example.com/articles/index.php
Redirect 301 /articles/covering.php http://www.example.com/articles/index.php
Redirect 301 /articles/bride_ready.php http://www.example.com/articles/index.php
RewriteRule ^weblog/?(.*)$ /cgi-bin/blosxom.cgi/$1
RewriteRule ^(.+)\.htm$ http://www.example.com/$1.php [R=301,L]
RewriteCond %{HTTP_HOST} ^example\.org [OR]
RewriteCond %{HTTP_HOST} ^69\.89\.23\.241
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteRule ^views/?(.*)$ http://example2.com/views/$1 [R=301,L]
RewriteRule ^analysis/?(.*)$ http://example2.com/analysis/$1 [R=301,L]
RewriteRule ^documents/?(.*)$ http://example2.com/documents/$1 [R=301,L]
RewriteRule ^palestinian-myths/?(.*)$ http://example2.com/palestinian-myths/$1 [R=301,L]
RewriteRule ^media/?(.*)$ http://example2.com/media/$1 [R=301,L]
RewriteEngine On
Redirect 301 /articles/ http://www.example.org/articles/histjeru.php
Redirect 301 /analysis/gaza_and_katrina.php http://example2.com/analysis/gaza-and-katrina.php
Redirect 301 /analysis/palestine-history.pdf http://example2.com/analysis/palestine_history.pdf
Redirect 301 /documents/unsc_resolution_338.php http://example2.com/documents/unsc-resolution-338.php
Redirect 301 /analysis/the_myth_of_occupied_territories.php http://example2.com/analysis/the-myth-of-occupied-territories.php
Redirect 301 /analysis/palestine_history.php http://example2.com/analysis/palestine-history.php
Redirect 301 /gaza-assistance.php http://example2.com/gaza-commentaries-booklets-pictures.php
Redirect 301 /analysis/the_israeli_humanitarian_lifeline_to_gaza.php http://example2.com/analysis/the-israeli-humanitarian-lifeline-to-gaza.php
Redirect 301 /analysis/jewish_blood_who_is_really_behind_the_gaza_flotilla.php http://example2.com/analysis/jewish-blood-who-is-really-behind-the-gaza-flotilla.php
Redirect 301 /analysis/is_israel_bound_by_international_law_to_supply_utilities_goods_and_services_to_gaza.php http://example2.com/analysis/is-israel-bound-by-international-law-to-supply-utilities-goods-and-services-to-gaza.php
Redirect 301 /contact.php http://example2.com/contact/contact.php
Redirect 301 /Blog.cgi/index.rss http://example2.com/cgi-bin/blosxom.cgi/index.rss
Redirect 301 /blog.cgi/index.rss http://example2.com/cgi-bin/blosxom.cgi/index.rss
Redirect 301 /weblog/why-must-an-arab-palestinian-state-be-jew-free.html) http://www.example2.com/weblog/why-must-an-arab-palestinian-state-be-jew-free.html
Redirect 301 /current.htm http://example2.com/
Redirect 301 /current.php http://example2.com/
Redirect 301 /weekly.xml http://example2.com/
RewriteRule ^weblog/?(.*)$ /cgi-bin/blosxom.cgi/$1
RewriteCond %{HTTP_HOST} ^www.example2.com$ [NC]
RewriteRule ^(.*)$ http://example2.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} example\.org$
RewriteRule ^(.*)$ "http\:\/\/example2\.org\/" [R=301,L]
RewriteRule ^(.+)\.htm$ http://example2.com/$1.php [R=301,L]
RedirectMatch 301 ^/palestinian_myths/$ http://example2.com/palestinian-myths/
RewriteRule ^archives/?(.*)$ http://example2.com/cgi-bin/mail.cgi/archive/emet
RewriteRule ^palestinian_myths/(.*)$ http://example2.com/palestinian-myths/$1 [R=301,L]