Jump to content

Multiforum .htaccess file not working


Ruko

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.