.htaccess

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

I have never used mod rewrite so I need a little help.

What do I put in my .htaccess files to make http://www.example.com always redirect to http://example.com?

I need to get rid of the www. Don't ask why because I can't really explain it.

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

Bump Smiling

Busy's picture

He has: 6,151 posts

Joined: May 2001

tried anything like:

RewriteEngine On
RewriteRule ^example.com example.com [L]

thats what you use for pages, not sure if it would work on domains

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

RewriteEngine On
RewriteRule ^example.com example.com [L]

I put that in the .htaccess file and it didn't work (yes, I changed example.com). I am guessing it is impossible. But if anyone has anymore ideas please post.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.