Hi, I'm trying to edit my .htacess file so that the default directory page will changed based on which domain name was entered. For instance, if google.com is entered, it will bring the user to one page. However, if images.google.com is entered, it will bring the user to a different page in the same directory. Thanks for your help!
I would use getenv("HTTP_REFERER") if (getenv("HTTP_REFERER") == 'image.google.com'){ header("HTTP/1.1 301 Moved Permanently"); header("Location: http://"page.com"); }else{ header("HTTP/1.1 301 Moved Permanently"); header("Location: http://anotherpage.com"); }
That doesn't really work the way I want it to. Instead of redirecting to a certain page, I want each domain to actually point to a different page in the same directory.