Skip to content

Instantly share code, notes, and snippets.

@netdesign
Created February 10, 2012 10:58
Show Gist options
  • Save netdesign/1788774 to your computer and use it in GitHub Desktop.
Save netdesign/1788774 to your computer and use it in GitHub Desktop.
Rewrite rules
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(css)$
RewriteRule ^/(.*)$ http://127.0.0.1/Lavori/mq/www/test.php?css=$1 [PT]
RewriteLog /var/log/apache2/rew.log
RewriteLogLevel 9
RewriteEngine On
RewriteCond %{REQUEST_URI} .(css)$
RewriteRule ^/(.)/style/(.)$ http://127.0.0.1/Lavori/mq/www/rew-test.php?css=$2 [PT]
RewriteLog /var/log/apache2/rew.log
RewriteLogLevel 9
LOGFILE
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial init rewrite engine with requested uri /Lavori/mq/www/style/testtest.css
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial applying pattern '^/(.)/style/(.)$' to uri '/Lavori/mq/www/style/testtest.css'
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial RewriteCond: input='/Lavori/mq/www/style/testtest.css' pattern='.(css)$' => matched
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial rewrite '/Lavori/mq/www/style/testtest.css' -> 'http://127.0.0.1/Lavori/mq/www/rew-test.php?css=testtest.css'
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial split uri=http://127.0.0.1/Lavori/mq/www/rew-test.php?css=testtest.css -> uri=http://127.0.0.1/Lavori/mq/www/rew-test.php, args=css=testtest.css
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial implicitly forcing redirect (rc=302) with http://127.0.0.1/Lavori/mq/www/rew-test.php
127.0.0.1 - - [10/Feb/2012:12:52:23 +0100] [127.0.0.1/sid#7f71e6c25390]rid#7f71e6f93d68/initial forcing 'http://127.0.0.1/Lavori/mq/www/rew-test.php' to get passed through to next API URI-to-filename handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment