Welcome to WebmasterWorld Guest from 54.196.233.239

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

UseCanonicalName

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

     

JakeLD

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

10+ Year Member



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

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

10+ Year Member



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

jdMorgan

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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
 

Featured Threads

Hot Threads This Week

Hot Threads This Month