Forum Moderators: phranque

Message Too Old, No Replies

Redirect Non www to www WITH FRONTPAGE

         

RunnerD

8:58 pm on Dec 9, 2005 (gmt 0)

10+ Year Member



Can someone please help we with this-

I am trying to redirect non www to WWW pages. I have done it successfully using the below code. However, all my Frontpage Forms stop working. Does anyone know of a workaround for this? Here is the code I am using:

# -Redirect non-www to the www domain name-
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]

However, when I add this code, the Frontpage forms stop working. Here is the front page code that is in the htaccess file as well:

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.site.com
AuthUserFile /home/brigh/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/brigh/public_html/_vti_pvt/service.grp

Can I have both using Frontpage? Is their a different way to go about it?

[edited by: jdMorgan at 1:44 am (utc) on Dec. 10, 2005]
[edit reason] Example.com [/edit]

kevinpate

9:09 pm on Dec 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

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

[edited by: jdMorgan at 1:45 am (utc) on Dec. 10, 2005]
[edit reason] Example.com [/edit]

Melanie

9:12 pm on Dec 9, 2005 (gmt 0)

10+ Year Member



This is the thread that helped me:
[webmasterworld.com...]

jdMorgan

1:36 am on Dec 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, as Melanie says, see this thread [webmasterworld.com], and start at message #34.[/url]

Jim