Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

301 redirect

Posted on 2014-09-17
5
Medium Priority
?
148 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A/B testing is a simple and effective trick to get to know your audience, increase website conversions and make the most out of your online ad campaigns. It's widely available and doesn't need much tech knowledge to be executed, but the results it y…
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 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…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

730 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