Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- attempt to block hot-linking actually blocks everything


jdMorgan - 12:44 am on Sep 22, 2002 (gmt 0)


Slade,

From my first post:

RewriteCond %{HTTP_HOST} !^www\.domain\.tld$
RewriteRule ^(.*)$ [domain.tld...] [L,R=permanent]

The essence of this is that it says,

"If we got here by using a domain name that is NOT www.domain.tld,
Then redirect to www.domain.tld."

Therefore, anyone entering your site using domain.tld will be redirected to www.domain.tld.

If you prefer to make a non-www domain name your "standard address", then you'd just change it to:

RewriteCond %{HTTP_HOST} !^domain\.tld$
RewriteRule ^(.*)$ [domain.tld...] [L,R=permanent]

In this way, your preserve both of the original "features" - domain name standardization, and upper/lowercase standardization.

No idea if this works with https - probably not unless the .htaccess is in an https-accessible directory - but I have never personally tried it.

Jim


Thread source:: http://www.webmasterworld.com/apache/33.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com