?
Solved

apache .htacccess  rewrite 301

Posted on 2011-09-24
2
Medium Priority
?
335 Views
Last Modified: 2012-05-12
i'm redirecting .html to php for a particular website

is the following sufficient (espec for search engine favorability) ...

RewriteEngine On

RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^index.html$ index.php [L]

Open in new window


or do i need in the last specifier  
 [L,R=301]

Open in new window



thanks
0
Comment
Question by:willsherwood
[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
2 Comments
 
LVL 2

Accepted Solution

by:
maricksville earned 2000 total points
ID: 36594464
I believe the 301 flag should be used where you want to permanently redirect. As in redirect to a file where the old file no longer exists.

This is done often when you remove old content from a website and rather than serving a 404 page you redirect traffic to a new page.

If the old HTML files will no longer exist and you are sure you will permanently use PHP files, then I would use the 301 flag.

Hope this helps.
0
 

Author Closing Comment

by:willsherwood
ID: 36595006
thank you...
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses
Course of the Month15 days, 5 hours left to enroll

649 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