mesh2005 Posted June 29, 2007 Share Posted June 29, 2007 I want all requests to all files except cgi-bin to be redirected from non-www to www. I wrote that rule but it redirects all to www, the exclusion is not working: RewriteEngine On RewriteCond %{HTTP_HOST} ^mydomain.com [NC] RewriteCond %{HTTP_HOST} !^mydomain.com/cgi-bin [NC] RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L,NC] Please help Link to comment https://forums.phpfreaks.com/topic/57752-help-with-htaccess-to-exclude-a-folder-from-redirection/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.