Forum

Drupal 7 UrlToolkit rewrite

Samiux
16 February 2011, 13:21
Hiawatha version: 7.4
Operating System: Ubuntu Server 10.10

Attached please find the .htaccess of Drupal 7.0. Would you mind rewrite for me? Thank you.

RewriteEngine on

RewriteRule "(^|/)\." - [F]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]

RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]

RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]


P.S. When using your current rewrite rule at HOWTO, it directs me to "404 Not Find" error.

Samiux

Hugo Leisink
16 February 2011, 21:44
That would be something like
RequestURI exists Return
Match /favicon.ico Return
Match .* Rewrite /index.php

The gzip rules can't be converted.
Samiux
17 February 2011, 10:55
Hugo,

You are very helpful. Thank you very much. Thanks for your hard work too.

Samiux
This topic has been closed.