homepage Welcome to WebmasterWorld Guest from 54.237.213.31
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Use httpd.conf to force uppercase in domain name?
Jesse_Smith

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4415361 posted 9:28 am on Feb 8, 2012 (gmt 0)

Is it possible to use httpd.conf to force uppercase letters in a domain name? This is what I got right now

<VirtualHost 123.123.123.123:80>
ServerName MyDomain.com
ServerAlias www.MyDomain.com
DocumentRoot /home/site17/public_html
ServerAdmin webmaster@MyDomain.com
## User site17 # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup site17 site17
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup site17 site17
</IfModule>
CustomLog /usr/local/apache/domlogs/MyDomain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
CustomLog /usr/local/apache/domlogs/MyDomain.com combined
ScriptAlias /cgi-bin/ /home/site17/public_html/cgi-bin/
</VirtualHost>
# CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS
<VirtualHost 123.123.123.123:80 *>
ServerName wor.anotherdomain.com
ServerAlias cpanel.* whm.* webmail.* webdisk.*
DocumentRoot /usr/local/apache/htdocs
ServerAdmin me@gmail.com
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
RewriteEngine On
<IfModule core.c>
SSLProxyEngine On
</IfModule>
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2096/$1 [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2078/$1 [P]
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) [127.0.0.1:2082...] [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteRule ^/(.*) [127.0.0.1:2095...] [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) [127.0.0.1:2086...] [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteRule ^/(.*) [127.0.0.1:2077...] [P]
UseCanonicalName Off
</VirtualHost>

and even after re-booting the server, it still redirects from www.MyDomain.com to www.mydomain.com. Where ever the code is that does that redirecting, I think I should be able to remove the redirect, or make it redirect from lowercase to MyDomain.com

 

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 4415361 posted 10:19 am on Feb 8, 2012 (gmt 0)

(Sorry, irrelevant comment deleted!)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved