Forum Moderators: phranque

Message Too Old, No Replies

.htaccess issues

always www. & upper / lower case issue

         

matimer

6:55 pm on Feb 21, 2006 (gmt 0)

10+ Year Member



I always want all pages to have a default of www. at the beginning

and I don't want lowercase/uppercase to be an issue (unix server)

Thanks

war59312

9:31 pm on Feb 22, 2006 (gmt 0)

10+ Year Member



I use this:

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

jdMorgan

5:22 am on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The uppercase/lowercase issue can be handled several ways.

If you httpd.conf access, you can use mod_rewrite's RewriteMap to call the system tolower or tolower functions to force all-uppercase or all-lowercase URLs.

You can use mod_speling to correct one or a few incorrect-case letters.

You can use content-negotiation (mod_negotiation) to let Apache pick the "best match" for the requested URL.

See the Apache module documentation [httpd.apache.org].

Jim