Solved

301 redirect

Posted on 2014-09-17
5
137 Views
Last Modified: 2014-09-28
Trying to implement a 301 redirect and am told by the site below that it isn't working:

http://www.best-seo-tools.net/301check/Default.aspx

I have tried (trying to redirect acesestimating.com to www.acesestimating.com):

Tried:
rewritecond %{http_host} ^acesestimating.com [nc]
rewriterule ^(.*)$ http://www.acesestimating.com/$1 [r=301,nc]

Tried:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Tried:
RewriteCond %{HTTP_HOST} ^acesestimating.com [NC]
RewriteRule ^(.*)$ http://www.acesestimating.com/$1 [L,R=301]

Thoughts?
0
Comment
Question by:classnet
  • 3
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40328274
RewriteEngine On
RewriteCond %{HTTP_HOST} ^acesestimating.com
RewriteRule (.*) http://www.acesestimating.com/$1 [R=301,L]

Open in new window

0
 

Author Comment

by:classnet
ID: 40328516
Ok... turns out that 1and1 hosts their php pages on IIS... which, I think, explains why Gary's answer won't work.

The code below is supposed to work within the web.config file:

    <rewrite>
        <rules>
        <rule name="Redirect to WWW" stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^acesestimating.com$" />
          </conditions>
          <action type="Redirect" url="http://www.acesestimating.com"
               redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>

This crashes the site altogether when I attempt to add this bit of code to the existing web.config file.  The existing file only contains a default document (index.php) section.

Any other thoughts?
0
 

Accepted Solution

by:
classnet earned 0 total points
ID: 40338670
I think we can delete this question...  I am moving the site from an IIS (MS) server to an Apache server and will use the .htaccess file.
0
 

Author Closing Comment

by:classnet
ID: 40348365
I have given up on the MS IIS server and am moving to Apache.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

[Part 3 of a 6 part series called SEO Basics: 5 SEO Secrets for Creating Content that Drives Traffic (http://www.experts-exchange.com/Web_Development/Internet_Marketing/Search_Engine_Optimization_SEO/A_8369-SEO-Basics-5-SEO-Secrets-for-Creating-Cont…
Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now