gabrix
15th October 2006, 18:31
Never had problems with mod rewrite i suppose i'm using same rewrite rules i used in the passed apache2.conf .I don't want users forced to write https:// to reach tor website .Rewrite rules are in the virual host apache2.conf file bit :
NameVirtualHost 192.168.1.6:443
<VirtualHost 192.168.1.6:443>
ServerName tor.gabrix.ath.cx
ServerAlias tor.ath.cx
ServerAdmin gabrix@gabrix.ath.cx
DocumentRoot /var/www/fuck
ErrorLog /var/log/apache2/tor_error.log
TransferLog /var/log/apache2/tor_access.log
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/tor.crt
SSLCertificateKeyFile /etc/apache2/ssl/tor.key
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{tor.gabrix.ath.cx}/$1 [NC,R,L]
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>
I'm sort of trying commenting out alterantively the rules you see or adding others i find in the net with different details to make it work.i have also wrote it in the .htaccess file and made a rewrite.conf file 'included'.You can try yourself http://tor.gabrix.ath.cx & https://tor.gabrix.ath.cx.The HTTP url will answer with an another website i have on port 80 and calls for tor.gabrix.ath.cx don't get redirected on port 443 .I'm not into regex but is necessary to use that RewriteRule .* - [F] it's there for deleting isn't it?what's its right position?Is it necessary?
Thanks !
NameVirtualHost 192.168.1.6:443
<VirtualHost 192.168.1.6:443>
ServerName tor.gabrix.ath.cx
ServerAlias tor.ath.cx
ServerAdmin gabrix@gabrix.ath.cx
DocumentRoot /var/www/fuck
ErrorLog /var/log/apache2/tor_error.log
TransferLog /var/log/apache2/tor_access.log
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/tor.crt
SSLCertificateKeyFile /etc/apache2/ssl/tor.key
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{tor.gabrix.ath.cx}/$1 [NC,R,L]
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>
I'm sort of trying commenting out alterantively the rules you see or adding others i find in the net with different details to make it work.i have also wrote it in the .htaccess file and made a rewrite.conf file 'included'.You can try yourself http://tor.gabrix.ath.cx & https://tor.gabrix.ath.cx.The HTTP url will answer with an another website i have on port 80 and calls for tor.gabrix.ath.cx don't get redirected on port 443 .I'm not into regex but is necessary to use that RewriteRule .* - [F] it's there for deleting isn't it?what's its right position?Is it necessary?
Thanks !