?
Solved

apache .htacccess  rewrite 301

Posted on 2011-09-24
2
Medium Priority
?
330 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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