httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Blandford <>
Subject [users@httpd] mod_rewrite question(s)
Date Wed, 29 Jun 2005 16:37:22 GMT
I've been trying to use mod_rewrite to have http calls on a couple of 
directories and either all .php or one specific .php file rewritten as 
https calls.

I have been able to use <directory successfully to get the directories 
to rewrite but I cannot for the life of me get a rewrite of to rewrite to

I am finding out just how tricky mod_rewrite and regular expressions can be.

Another problem I am seeing is even though I have logging turned on in 
my conf file, and that the log file was created, nothing has been 
written to it...

Here is the portion of my conf file relating to the problem. (domain 
names have been changed to protect the innocent)

        #    ServerName
        #    ErrorLog logs/
        #    CustomLog logs/ common

        RewriteEngine On

            DocumentRoot /var/www/
            RewriteLog "/var/log/httpd/rewrite_log"
            RewriteLogLevel 8
            ServerAlias * *
            Alias /merchant /var/www/
            Alias /admin /var/www/
            ScriptAlias /cgi-bin /var/www/
            ErrorLog /var/log/httpd/
            CustomLog /var/log/httpd/ common

        # 1
        <Directory "/var/www/">
            Options FollowSymLinks
            AllowOverride All   
            RewriteCond %{HTTPS} !=on
            RewriteRule ^/(.*)$1 [R]

        <Directory "/var/www/">
            Options FollowSymLinks
            AllowOverride All
            RewriteCond %{HTTPS} !=on
            RewriteRule ^/(.*)$1 [R]

        <Directory "/var/www/">
          SetHandler perl-script
          PerlResponseHandler ModPerl::Registry
          PerlOptions +ParseHeaders
          Options +ExecCGI

The #1 and #2 ones work. currently. They take any request that is not 
https and convert it to https.

Any help is greatly appreciated!

Steve Blandford

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message