I have not changed this, and the conditions have not changed. The problem seemed to begin when I upgraded to Ubuntu 8.04 LTS from 6.10.
The code below has produced the following:
http://services.yi.se/http://www.google.com
Would redirect to http://services.yi.se/redirect/put.pl?u ... google.com
put.pl would just log the redirect and forward.
The below code is what used to work.
I tried setting RewriteOptions Inherit, but that didn't do much.
Does anyone have an idea?
- Code: Select all
<Directory /var/www/services.yi.se>
AllowOverride all
IndexOptions FancyIndexing FoldersFirst NameWidth=* SuppressHTMLPreamble ScanHTMLTitles DescriptionWidth=120
Options +ExecCGI +FollowSymlinks
AddType application/x-httpd-php .php .html
AddType text/html .php
AddHandler cgi-script .pl
AddHandler application/x-httpd-php .php
DirectoryIndex index.php index.html index.pl
HeaderName /HEADER.php
ReadmeName /README.php
IndexIgnore HEADER.php README.php
RewriteEngine on
RewriteBase /
# http://
# https:// (with query)
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(http://.+)$ http://services.yi.se/redirect/put.pl?url=$1 [R,L]
RewriteRule ^{(.+)};(http://.+)$ http://services.yi.se/redirect/put.pl?tag=$1&url=$2 [R,L]
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(http://.+)$ http://services.yi.se/redirect/put.pl?url=$1\?%{QUERY_STRING} [R,L]
RewriteRule ^{(.+)};(http://.+)$ http://services.yi.se/redirect/put.pl?tag=$1&url=$2\?%{QUERY_STRING} [R,L]
# https://
# https:// (with query)
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(https://.+)$ http://services.yi.se/redirect/put.pl?url=$1 [R,L]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^{(.+)};(https://.+)$ http://services.yi.se/redirect/put.pl?tag=$1&url=$2 [R,L]
RewriteRule ^(https://.+)$ http://services.yi.se/redirect/put.pl?url=$1\?%{QUERY_STRING} [R,L]
RewriteRule ^{(.+)};(https://.+)$ http://services.yi.se/redirect/put.pl?tag=$1&url=$2\?%{QUERY_STRING} [R,L]
# ftp://
RewriteRule ^(ftp://.+)$ http://services.yi.se/redirect/put.pl?url=$1 [R,L]
</Directory>