Solved

.htaccess file again (only html files)

Posted on 2014-09-26
2
89 Views
Last Modified: 2014-09-27
I'm working on a .htaccess file and it is redirecting everything.  How could I change it so that it only redirects .html files?

RewriteEngine on
RewriteRule (.*) http://newsite.com/ [R=301,L]

Open in new window

0
Comment
Question by:hrolsons
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40346779
What are you wanting to redirect to?
This is the syntax...
RedirectMatch 301 (.*)\.html$ http://newsite.com

Open in new window

0
 

Author Closing Comment

by:hrolsons
ID: 40347884
I wanted all .html pages redirected to the root of the new site and your suggestion worked perfectly.  Thank You!!!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

912 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

17 Experts available now in Live!

Get 1:1 Help Now