for instance, if a visitor type on the browser address: mydomain.com, mydomain.com/forums/
it will automatically redirect to http://www.mydomain.com and http://www.mydomain.com/forums, respectively?
would the mod rewrite work? and how?
Thanks!
Moderator: General Moderators
Code: Select all
// $path = the location typed into the address bar
if($path != "e;http://www.domain.com"e;){
header("e;Location: http://www.domain.com"e;); }
if($path != "e;http://www.domain.com/forums"e;) {
header("e;Location: http://www.domain.com/forums"e;); }Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} =domain.com їNC]
RewriteRule ^ http://www.domain.com%{REQUEST_URI} їR,L]Code: Select all
orCode: Select all
tags to avoid this filter.[/color]