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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.