1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect home page via htaccess

Discussion in 'Troubleshooting and Problems' started by ArnyVee, May 27, 2012.

  1. ArnyVee

    ArnyVee Well-Known Member

    Hey there,

    I want my recent activity page to be my home page when folks visit my domain. So, I'd like to see what I should place in my .htaccess file in order to move folks from mypage.net to mypage.net/index.php?recentactivity
  2. ArnyVee

    ArnyVee Well-Known Member

  3. Chris D

    Chris D XenForo Developer Staff Member

    That should work!
  4. ArnyVee

    ArnyVee Well-Known Member

    Does it matter where I include the line on the htaccess file?

    Also, I just noticed that there is an htaccess.txt file ... should that be renamed to remove the .txt portion?
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This will redirect only the root URL. This can be added to the top of the default .htaccess file if you are using that file:

    RedirectMatch ^/$ /index.php?recent-activity
    This works well without friendly URLs. But if you are using friendly URLs then the root URL is the forum index which means this redirect effectively overwrites the forum index making it inaccessible.
    ArnyVee likes this.
  6. ArnyVee

    ArnyVee Well-Known Member

    Jake, the file I have is htaccess.txt and is in the root. Do I rename that to .htaccess?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ArnyVee likes this.
  8. ArnyVee

    ArnyVee Well-Known Member

    Worked perfectly, thanks Jake! :D

Share This Page