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

Apache Web Server Forum

    
UseCanonicalName
can you change this setting to "off" with Shell Acccess or .htaccess
JakeLD




msg:1496462
 6:10 pm on Oct 28, 2003 (gmt 0)

Hi,

My hosting company allows me to add "add on domains". When I add on a domain, the entry written to the httpd.conf contains the default ("on") of the UseCanonicalName [apacheref.com] directive.

Can I change the value of the UseCanonicalName directive to "off" using .htaccess or Shell Access?

Thanks.

FYI...
Here's what's written in the httpd.conf file (with info removed)

<VirtualHost 00.12.34.567>
BytesLog domlogs/subfolder.maindomain.com-bytes_log
ServerName subfolder.maindomain.com
ServerAlias addondomain.com *.addondomain.com
ServerAdmin wwwadmin@@maindomain.com
DocumentRoot /home/discount/public_html/subfolder
CustomLog domlogs/subfolder.maindomain.com combined
ScriptAlias /cgi-bin/ /home/discount/public_html/subfolder/cgi-bin/
UseCanonicalName on
User username
Group username
</VirtualHost>

note: UseCanonicalName on is not really there since it is the default. I want to be able to change the value to off and insert UseCanonicalName off

 

jdMorgan




msg:1496463
 8:35 pm on Oct 28, 2003 (gmt 0)

JakeLD,

UseCanonicalName is only available in server config files, not in .htaccess. Because of the way that .htaccess works, it's too late to change that setting once the server API processing reaches the .htaccess level.

As stated in the documentation, you'll have to add the UseCanonicalName off directive to the <VirtualHost> container or to a <directory> container within that virtual host.

Jim

JakeLD




msg:1496464
 8:54 pm on Oct 28, 2003 (gmt 0)

How do you add the directive to <VirtualHost>? Can it be done if I have Shell Access? What would the commands look like?

jdMorgan




msg:1496465
 9:47 pm on Oct 28, 2003 (gmt 0)

JakeLD,

If you know how to use vi or have emacs or any other editor installed, and have permissions set to allow it, then you'd just change that line in the appropriate <VirtualHost> entries in httpd.conf and restart the server. Otherwise, you'll have to ask the hosting company to do it.

<VirtualHost 00.12.34.567>
BytesLog domlogs/subfolder.maindomain.com-bytes_log
ServerName subfolder.maindomain.com
ServerAlias addondomain.com *.addondomain.com
ServerAdmin wwwadmin@@maindomain.com
DocumentRoot /home/discount/public_html/subfolder
CustomLog domlogs/subfolder.maindomain.com combined
ScriptAlias /cgi-bin/ /home/discount/public_html/subfolder/cgi-bin/
UseCanonicalName [b]off[/b]
User username
Group username
</VirtualHost>

Jim

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