https://issues.apache.org/bugzilla/show_bug.cgi?id=47332

           Summary: [mod_rewrite] SERVER_NAME env var should be the vhost
                    server_name
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: All
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Most used of the url rewriting rule is a redirection to the SERVER_NAME
(elitwork.com to www.elitwork.com by example).

Most of the time, the url to redirect to is also the servername given in the
httpd.conf file.

The problem is that the env var SERVER_NAME in the mod_rewrite is corresponding
to the domain name used in the request, so SERVER_NAME can also be an
server_alias defined in the virtualhost.

The problem is that it impeach apache user to define a global rule to be sure
that a user using a server_alias will be redirected to the server_name domain.

i.e, this doesn't work : 

RewriteCond %{HTTP_HOST} !%{SERVER_NAME}
RewriteRule (.*) %{SERVER_NAME}/$1 [R=301,L]

I don't know if it is the right place but my english is poor and it's already a
miracle if you understand what i wrote here ;)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to