Archief - Rewrite loop

Het archief is een bevroren moment uit een vorige versie van dit forum, met andere regels en andere bazen. Deze posts weerspiegelen op geen enkele manier onze huidige ideeën, waarden of wereldbeelden en zijn op sommige plaatsen gecensureerd wegens ontoelaatbaar. Veel zijn in een andere tijdsgeest gemaakt, al dan niet ironisch - zoals in het ironische subforum Off-Topic - en zouden op dit moment niet meer gepost (mogen) worden. Toch bieden we dit archief nog graag aan als informatiedatabank en naslagwerk. Lees er hier meer over of start een gesprek met anderen.

demon326

Legacy Member
Hallo allen,

Ik heb een drupal website die pagina's statisch cached voor niet ingelogde leden, en dit zou ik ook graag zo houden voor de mobiele versie van de website. Dit was tot voor kort niet mogelijk, tot dat ik deze tutorial volgde:Making a Boost cached site mobile | drupal.org

Echter loopt het daar fout, één van die rewrite rules loopt en dus zit daar ergens de fout..

Hier beneden een copy van mijn .htaccess file:
Code:
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
#Event pagina wordt niet gebruikt, om 404-page not found te voorkomen, verwijzen we deze naar de voorpagina!
RewriteRule ^event/(.*)$ http://ashladan.be [R=301,L]
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
    RewriteCond %{HTTP_HOST} ^www\.ashladan\.be$ [NC]
   RewriteRule ^(.*)$ http://ashladan.be/$1 [L,R=301]
  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /
  
  
   #set cookie (in the client's browser)
  RewriteCond %{QUERY_STRING} ^(.*)device=desktop(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=mobile(.*)$
  RewriteRule .* - [CO=mt_device:desktop:.ashladan.be:1440:/]

  #redirect to desktop site based on url or cookie
  # don't apply the rules if already in the desktop site, infintine loop
  RewriteCond %{HTTP_HOST} !^www\.(.*)$
  RewriteCond %{QUERY_STRING} ^(.*)device=desktop(.*)$ [OR]
  RewriteCond %{HTTP_COOKIE} mt_device=desktop
  RewriteRule ^(.*)$ http://ashladan.be/ [L,R=302]

  #no redirect to mobile when cookie=desktop and user agent is mobile
  RewriteCond %{HTTP_HOST} !^m\.(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=mobile(.*)$
  RewriteCond %{HTTP_COOKIE} mt_device=desktop
  #skip the next two rules
  RewriteRule .* - [S=2]

  #set cookie (in the client's browser)
  RewriteCond %{QUERY_STRING} ^(.*)device=mobile(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=desktop(.*)$
  RewriteRule .* - [CO=mt_device:mobile:.ashladan.be:1440:/]

  #redirect to mobile site based on url, cookie or device type
  # don't apply the rules if already in the mobile site, infintine loop
  RewriteCond %{HTTP_HOST} !^m\.(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=desktop(.*)$
  RewriteCond %{QUERY_STRING} ^(.*)device=mobile(.*)$ [OR]
  RewriteCond %{HTTP_COOKIE} mt_device=mobile [OR]
  #http://ohryan.ca/blog/2011/01/21/modern-mobile-redirect-using-htaccess/
  RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR]
  # http://ohryan.ca/blog/2009/02/18/revisiting-mobile-redirection-using-hta...  # if the browser accepts these mime-types, it's definitely mobile, or pretending to be
  RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]
  # a bunch of user agent tests
  RewriteCond %{HTTP_USER_AGENT} "sony|symbian|nokia|samsung|mobile|windows ce|epoc|opera mini" [NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "blackberry|ericsson,|panasonic|philips|sanyo|sharp|sie-"[NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|palm|series60|palmsource|pocketpc"[NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|iPhone|android"[NC]
  #iPad user agent has "Mobile", but we treat it as desktop
  RewriteCond %{HTTP_USER_AGENT} !ipad [NC]
  #status code 301 would stop future switching between desktop/mobile bcs. browsers cache that status code
  RewriteRule ^(.*)$ http://m.ashladan.be/ [L,R=302]
  
  
     ### BOOST START ###
  AddDefaultCharset utf-8
  FileETag All
  <FilesMatch "(\.html|\.html\.gz)$">
    <IfModule mod_headers.c>
      Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
      Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
    </IfModule>
  </FilesMatch>
  <IfModule mod_mime.c>
    AddCharset utf-8 .html
    AddCharset utf-8 .css
    AddCharset utf-8 .js
    AddEncoding gzip .gz
  </IfModule>
  <FilesMatch "(\.html|\.html\.gz)$">
    ForceType text/html
  </FilesMatch>
  <FilesMatch "(\.js|\.js\.gz)$">
    ForceType text/javascript
  </FilesMatch>
  <FilesMatch "(\.css|\.css\.gz)$">
    ForceType text/css
  </FilesMatch>

  # Gzip Cookie Test
  RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]

  # GZIP - Cached css & js files
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=2]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css\.gz -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js\.gz -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]

  # NORMAL - Cached css & js files
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]

  # Caching for anonymous users
  # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
  RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
  RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
  RewriteCond %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
  RewriteRule .* cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]

  # NORMAL
  RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]
  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]
  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.81.2.4 2008/01/22 09:01:39 drumm Exp $

AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json
ExpiresActive On
ExpiresByType text/html A1
ExpiresByType application/x-javascript "access plus 2 years"
ExpiresByType application/javascript "access plus 2 years"
ExpiresByType text/javascript "access plus 2 years"
ExpiresByType text/css "access plus 2 years"
ExpiresByType image/gif "access plus 2 years"
ExpiresByType image/jpeg "access plus 2 years"
ExpiresByType image/jpg "access plus 2 years"
ExpiresByType image/png "access plus 2 years" 

Redirect permanent /festivals/ http://ashladan.be/
Redirect permanent /festivals/ http://ashladan.be/

php_value memory_limit "80M"


Edit: Als ik naar een andere site verwijs, werkt het wel..

Httpfox log:
Code:
00:00:05.824	0.090	958	492	GET	302	Redirect to: http://m.ashladan.be/	http://ashladan.be/
00:00:05.972	0.103	900	486	GET	301	Redirect to: http://www.ashladan.be/	http://m.ashladan.be/
00:00:06.146	0.131	902	511	GET	301	Redirect to: http://ashladan.be/	http://www.ashladan.be/
00:00:06.349	0.062	908	492	GET	302	Redirect to: http://m.ashladan.be/	http://ashladan.be/
00:00:06.485	0.127	900	486	GET	301	Redirect to: http://www.ashladan.be/	http://m.ashladan.be/

De redirect komt enkel in actie in het geval van een useragent die een phone is, na te bootsen met user agent switcher in firefox.

demon326

Legacy Member
*bump*

Probleem is nog steeds niet opgelost geraakt....

Huidige .htaccess file:
Code:
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
#Event pagina wordt niet gebruikt, om 404-page not found te voorkomen, verwijzen we deze naar de voorpagina!
RewriteRule ^event/(.*)$ http://ashladan.be [R=301,L]
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
    RewriteCond %{HTTP_HOST} ^www\.ashladan\.be$ [NC]
   RewriteRule ^(.*)$ http://ashladan.be/$1 [L,R=301]
  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
   RewriteBase /
  
  
   #set cookie (in the client's browser)
  RewriteCond %{QUERY_STRING} ^(.*)device=desktop(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=mobile(.*)$
  RewriteRule .* - [CO=mt_device:desktop:.ashladan.be:1440:/]

  #redirect to desktop site based on url or cookie
  # don't apply the rules if already in the desktop site, infintine loop
  #RewriteCond %{HTTP_HOST} !^www\.(.*)$
  RewriteCond %{HTTP_HOST} !^ashladan\.be$
  RewriteCond %{QUERY_STRING} ^(.*)device=desktop(.*)$ [OR]
  RewriteCond %{HTTP_COOKIE} mt_device=desktop
  RewriteRule ^(.*)$ http://ashladan.be/ [L,R=302]

  #no redirect to mobile when cookie=desktop and user agent is mobile
  RewriteCond %{HTTP_HOST} !^m\.(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=mobile(.*)$
  RewriteCond %{HTTP_COOKIE} mt_device=desktop
  #skip the next two rules
  RewriteRule .* - [S=2]

  #set cookie (in the client's browser)
  RewriteCond %{QUERY_STRING} ^(.*)device=mobile(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=desktop(.*)$
  RewriteRule .* - [CO=mt_device:mobile:.ashladan.be:1440:/]

  #redirect to mobile site based on url, cookie or device type
  # don't apply the rules if already in the mobile site, infintine loop
  RewriteCond %{HTTP_HOST} !^m\.(.*)$
  RewriteCond %{QUERY_STRING} !^(.*)device=desktop(.*)$
  RewriteCond %{QUERY_STRING} ^(.*)device=mobile(.*)$ [OR]
  RewriteCond %{HTTP_COOKIE} mt_device=mobile [OR]
  #http://ohryan.ca/blog/2011/01/21/modern-mobile-redirect-using-htaccess/
  RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR]
  # http://ohryan.ca/blog/2009/02/18/revisiting-mobile-redirection-using-hta...  # if the browser accepts these mime-types, it's definitely mobile, or pretending to be
  RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]
  # a bunch of user agent tests
  RewriteCond %{HTTP_USER_AGENT} "sony|symbian|nokia|samsung|mobile|windows ce|epoc|opera mini" [NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "blackberry|ericsson,|panasonic|philips|sanyo|sharp|sie-"[NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|palm|series60|palmsource|pocketpc"[NC,OR]
  RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|iPhone|android"[NC]
  #iPad user agent has "Mobile", but we treat it as desktop
  RewriteCond %{HTTP_USER_AGENT} !ipad [NC]
  #status code 301 would stop future switching between desktop/mobile bcs. browsers cache that status code
  RewriteRule ^(.*)$ http://m.ashladan.be/ [L,R=302]
  
  
     ### BOOST START ###
  AddDefaultCharset utf-8
  FileETag All
  <FilesMatch "(\.html|\.html\.gz)$">
    <IfModule mod_headers.c>
      Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
      Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
    </IfModule>
  </FilesMatch>
  <IfModule mod_mime.c>
    AddCharset utf-8 .html
    AddCharset utf-8 .css
    AddCharset utf-8 .js
    AddEncoding gzip .gz
  </IfModule>
  <FilesMatch "(\.html|\.html\.gz)$">
    ForceType text/html
  </FilesMatch>
  <FilesMatch "(\.js|\.js\.gz)$">
    ForceType text/javascript
  </FilesMatch>
  <FilesMatch "(\.css|\.css\.gz)$">
    ForceType text/css
  </FilesMatch>

  # Gzip Cookie Test
  RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]

  # GZIP - Cached css & js files
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=2]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css\.gz -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js\.gz -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]

  # NORMAL - Cached css & js files
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js -s
  RewriteRule .* cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]

  # Caching for anonymous users
  # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
  RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
  RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
  RewriteCond %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
  RewriteRule .* cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]

  # NORMAL
  RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]
  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]
  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.81.2.4 2008/01/22 09:01:39 drumm Exp $
#Redirect permanent /shop/ http://shop.ashladan.be/
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html A1
  ExpiresByType application/x-javascript "access plus 2 years"
  ExpiresByType application/javascript "access plus 2 years"
  ExpiresByType text/javascript "access plus 2 years"
  ExpiresByType text/css "access plus 2 years"
  ExpiresByType image/gif "access plus 2 years"
  ExpiresByType image/jpeg "access plus 2 years"
  ExpiresByType image/jpg "access plus 2 years"
  ExpiresByType image/png "access plus 2 years" 
</IfModule>

Redirect permanent /festivals/ http://ashladan.be/
Redirect permanent /festivals/ http://ashladan.be/

php_value memory_limit "80M"

RewriteCond %{HTTP_HOST} ^www.ashladan.nl [NC]
RewriteRule ^(.*)$ http://ashladan.be/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^ashladan.nl [NC]
RewriteRule ^(.*)$ http://ashladan.be/$1 [L,R=301]
:help:
Het archief is een bevroren moment uit een vorige versie van dit forum, met andere regels en andere bazen. Deze posts weerspiegelen op geen enkele manier onze huidige ideeën, waarden of wereldbeelden en zijn op sommige plaatsen gecensureerd wegens ontoelaatbaar. Veel zijn in een andere tijdsgeest gemaakt, al dan niet ironisch - zoals in het ironische subforum Off-Topic - en zouden op dit moment niet meer gepost (mogen) worden. Toch bieden we dit archief nog graag aan als informatiedatabank en naslagwerk. Lees er hier meer over of start een gesprek met anderen.
Terug
Bovenaan