Cory94bailly Posted March 5, 2010 Share Posted March 5, 2010 Hi.. This is my current .htaccess (Given to me from users here on PhpFreaks ) RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?MYSITE\.net [NC] RewriteRule ^$ http://blog.MYSITE.net/ [R=301,L] RewriteCond %{HTTP_HOST} ^(www\.)?MYSITE\.net [NC] RewriteRule (.*) http://forum.MYSITE.net/$1 [QSA,R=301] I would like it so if they go directly to MYSITE.net, it will go to the blog, which works fine. And if they go to anything else (ex: MYSITE.net/lol.php >>> forum.MYSITE.net/lol.php), which also works fine. But I would like it so if the file they are attempting to go to exists, let them go to it.. If it doesn't exist, redirect it to forums.MYSITE.net/WhateverTheyTyped Also, how would I make it so if they go to certain files/folders, it gives them either a 404 or just redirects them? Thanks guys! Link to comment https://forums.phpfreaks.com/topic/194199-quick-htaccess-change/ Share on other sites More sharing options...
Cory94bailly Posted March 6, 2010 Author Share Posted March 6, 2010 BUMP Link to comment https://forums.phpfreaks.com/topic/194199-quick-htaccess-change/#findComment-1022206 Share on other sites More sharing options...
Cory94bailly Posted March 6, 2010 Author Share Posted March 6, 2010 BUMP ² Link to comment https://forums.phpfreaks.com/topic/194199-quick-htaccess-change/#findComment-1022475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.