Can't seem to redirect main domain to the /forum folder. get 500 error

  • I've been trying to forward my site from the main domain to the /forum.


    here's what I've used, at the direction of dreamhost


    RewriteEngine on
    RewriteCond %{HTTP_HOST} example\.com [NC]
    RewriteCond %{REQUEST_URI} ^/$
    RewriteRule ^(.*)$ /forum/$1 [L]


    When I do this, my site goes off line with a redirect error.


    I get this error too


    [Fri Jan 29 01:45:22 2016] [error] [client xx.xxx.xx.xx] client denied by server configuration: /home/example/example.com/forum/wcf/language/1_wcf.user.menu.php


    Can anyone explain how I can redirect my main site to the /forum folder?


    using apache and a .htaccess file, of course.

  • Your problem I find very interesting because when I tried to establish Friendly URL's - using the guidelines of Alexander Ebert, and the Source Codes given to me by Andrea Berg, I got Error 404.
    So I turned the matter over to the Manager of my Hosting Provider and he tried to set up the Friendly URL's - the .htaccess files and the "whole 9 yards". Did NOT work for him either - as he got Error 500.


    I have since sent an email to Andrea Berg about this issue I am having - waiting for reply.
    Not sure of course, but MAYBE your problem is also linked somehow to the same condition (or similar) that I am experiencing.

  • I just tried setting up a redirect to a test folder with just an index.html file in it. Same thing. Whenever I set up a redirect, it breaks all links to the main domain and under it and gives a error 500. Nothing I have done will redirect anything.

  • Of course it does. The domain is set in wcf1_applications.


    So what would I need to do?


    I've tried changing the main web directory to the /forum on my host (dreamhost) but then all I get are html of the forum.

  • To be clear.


    My Forum is installed in the /forum directory of my doman and it works fine. I originally installed the forum there and have not changed anything.


    What I want to do it point my domain to the /forum where my forum is installed and working.


    Shouldn't a simple redirect work?

  • I got it to work with this:


    RewriteEngine on
    RewriteCond %{HTTP_HOST} domain\.com [NC]
    #RewriteCond %{REQUEST_URI} ^/$
    RewriteRule ^(.*)$ /forum/$1 [L]



    The only problem now is that when I go to the main domain it logs me out of the forum every time. If I go directly to the forum location (in /forum) everything works as normal. When I go to the main domain, I'm logged out of the forum . Also the URLs are not cleaned up as they are with a direct link into the forum.

  • I actually got it working now. I made sure that all domain requests ADD the www subdomain to the URLs. so now everything forwards to the /forum and goes right to my forum.


    so no matter what URL is entered (www.domain.com or domain.com) everything forwards to www.domain.com/forum


    I think that the redirects were not working before because the text editor was set to wrap text, even though none of the text in my .htacces file was wrapped. It was very confusing.


    Thanks for all the help. I really appreciate it.


    :)

  • Still not working correctly. When I go to domain.com, it logs me out. Does the cookie path have to be changed?


    Here's what I've done.


    1. installed forum in the /forum of my domain
    2. forwarded my domain to the /forum where my forum is


    The problem.


    When I go to mydomain.com, it does redirect to my forum in the /forum directory. every time I go to domain.com, I am logged out of the forum. It does not keep my session.


    Is this s cookie issue?



    All I want to do is redirect mydomain.com to mydomian/forum
    So when someone types mydomain.com, I want then to be seamlessly shown my forum.


    I'm going nuts with this, lol. I thought everything was working.

  • Okay, it's all sorted out now. I went into the database and changed the cookie path from /forum/ to just /


    One thing that was throwing me off was the cache in my browser. Makes things kind of confusing for a relative newbie like me. I thank you all for your patience with me!


    Cheers!