.htaccess more than one command in the file
Posted
by Stefan
on Stack Overflow
See other posts from Stack Overflow
or by Stefan
Published on 2010-05-15T18:21:04Z
Indexed on
2010/05/15
18:44 UTC
Read the original article
Hit count: 257
Hey I have an .htaccess file with the following code:
<Files ~ "item|profile|category|search">
ForceType application/x-httpd-php
</Files>
What I want is to add a re-write rule as well which changes any body who navigates to the site to use http://www.domain.com sintead of http://domain.com
I have the code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ http://www.DOMAIN.com/$1 [R,L]
however I can't seem to just place in the file as it corrupts? Or just doesn't work... I wish I knew more about .htaccess files
How can I add this in?
Thanks,
Stefan
© Stack Overflow or respective owner