Electrik
05-20-2001, 11:28 PM
Hi,
i have a problem with rewrite rules in httpd.conf file.
Adding # in rewrite conditions server don't put www in domain names when you enter url to existing file or directory without it.
But have next problem:
http://domain.com/test/ -> work ok, don't add www
http://domain.com/test -> rewrite to www.domain.com/test/
Actual virtual config in httpd.conf.custom (called with include in httpd.conf)
--
<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.domain.com
ServerAdmin admin
DocumentRoot /home/sites/site1/web
ServerAlias domain.com
RewriteEngine on
#RewriteCond %{HTTP_HOST} !^xxx.xxx.xxx.xxx(:80)?$
#RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
#RewriteRule ^/(.*) http://www.domain.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
anyone know how to avoid this?
i have a problem with rewrite rules in httpd.conf file.
Adding # in rewrite conditions server don't put www in domain names when you enter url to existing file or directory without it.
But have next problem:
http://domain.com/test/ -> work ok, don't add www
http://domain.com/test -> rewrite to www.domain.com/test/
Actual virtual config in httpd.conf.custom (called with include in httpd.conf)
--
<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.domain.com
ServerAdmin admin
DocumentRoot /home/sites/site1/web
ServerAlias domain.com
RewriteEngine on
#RewriteCond %{HTTP_HOST} !^xxx.xxx.xxx.xxx(:80)?$
#RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
#RewriteRule ^/(.*) http://www.domain.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
anyone know how to avoid this?
