Solved

apache .htacccess  rewrite 301

Posted on 2011-09-24
2
327 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 500 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

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…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 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