Ruko Posted November 15, 2011 Share Posted November 15, 2011 I recently recoded a multiforum software, it works fine but the problem is, the redirection. I have a wildcard domain setup, and if people visit "test.multiforum.com" then it works. but if they visit something like for example "test.multiforum.com/viewforum.php" then it leads to 404 error. Here's what i have been getting on the error log. 2011-11-15 17:19:38.914 [iNFO] [**.***.**.***:50039-0#APVH_*.terra-boards.com] File not found [/home/n****x/public_html/terra-b****s.com/viewforum.php] I don't know why im getting that error. Here's my .htaccess file, I don't know what i did wrong. RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.terra-boards\.com$ RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9][a-z0-9\-]*[a-z0-9])\.terra-boards\.com$ [NC] RewriteCond %{REQUEST_URI} !^phpbbforums/ RewriteRule ^$ phpbbforums/ [L] Can someone help me on this? Link to comment https://forums.phpfreaks.com/topic/251218-multiforum-htaccess-file-not-working/ Share on other sites More sharing options...
requinix Posted November 15, 2011 Share Posted November 15, 2011 1. I assume the multi-board thing looks at the HTTP_HOST to determine which board to show? 2. The REQUEST_URI always begins with a slash. 3. Does /viewforum.php actually exist? No? But it does exist in /phpbbforums/ right? How about moving all those files right into the root and not bothering with the subfolder. Link to comment https://forums.phpfreaks.com/topic/251218-multiforum-htaccess-file-not-working/#findComment-1288512 Share on other sites More sharing options...
Ruko Posted November 15, 2011 Author Share Posted November 15, 2011 1. I assume the multi-board thing looks at the HTTP_HOST to determine which board to show? 2. The REQUEST_URI always begins with a slash. 3. Does /viewforum.php actually exist? No? But it does exist in /phpbbforums/ right? How about moving all those files right into the root and not bothering with the subfolder. moving all the files in the root would mean that i have to replace my website's index.php, so i cant move all the files in the root. Link to comment https://forums.phpfreaks.com/topic/251218-multiforum-htaccess-file-not-working/#findComment-1288517 Share on other sites More sharing options...
Ruko Posted November 16, 2011 Author Share Posted November 16, 2011 ok i got part of it fixed. Now all i need to do is... how do i remove the phpbbforums in test.multiforum.com/phpbbforums? RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.terra-boards\.com$ RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9][a-z0-9\-]*[a-z0-9])\.terra-boards\.com$ [NC] RewriteRule ^$ /phpbbforums/ [L] Link to comment https://forums.phpfreaks.com/topic/251218-multiforum-htaccess-file-not-working/#findComment-1288537 Share on other sites More sharing options...
Ruko Posted November 16, 2011 Author Share Posted November 16, 2011 Changed the code a bit more... I apologize if im bumping Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{HTTP_HOST} !^www\.terra-boards\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.terra-boards\.com$ [NC] RewriteRule .* /phpbbforums/$1 [L] This time, everytime i go on some other page in test.terra-boards.com, it redirects to the index and the url bar stays the same. Link to comment https://forums.phpfreaks.com/topic/251218-multiforum-htaccess-file-not-working/#findComment-1288543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.