troubleshooting Question

htaccess does not seem to be working

Avatar of hungoveragain
hungoveragain asked on
Web DevelopmentApache Web Server
2 Comments1 Solution261 ViewsLast Modified:
I have a site that I am trying to divert non-www to www. I can get this code to work on another domain I have, but it simply doesn't work on this one.

Here is the contents of the entire htaccess file.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{HTTP_HOST} ^domain.co.uk [NC]
rewriterule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301,NC]

As I say it works elsewhere but not on this domain.

I have tried placing the htaccess file in several different places but to no avail.

The server is a standard LAMP configuration - or so I am told.

Any ideas?

Thanks

Mike
ASKER CERTIFIED SOLUTION
d4011

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros