haku Posted June 11, 2008 Share Posted June 11, 2008 So I have three things I am trying to accomplish in my .htaccess file (at the moment). I am trying to: 1) Redirect anything from the non-'www' domain to the www domain 2) process html files as php 3) Set up a 301 redirect for some files that have been renamed and moved to other directories The first two have worked without any troubles up until now. Where I am having the problem is in the 301 redirect I have created. I am using the following code (in my root directory .htaccess file) RewriteRule /access/index.htm$ http://www.site.com/school_info/map.html [R=301] The problem is that it will only forward site.com/access/index.htm It will not forward www.site.com/access/index.htm How can I get it to also forward the www version of the page? Here is my entire .htaccess file if necessary: RewriteEngine on RewriteRule /access/index.htm$ http://www.site.com/school_info/map.html [R=301] Options +FollowSymlinks rewritecond %{http_host} ^site.com [nc] rewriterule ^(.*)$ http://www.site.com/$1 [r=301,nc] AddHandler application/x-httpd-php .html Link to comment https://forums.phpfreaks.com/topic/109674-301-redirect-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.