Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirect no longer working


  • kevindp
    Member

    @kevindp

    Thanks in advance for any help you can provide!

    I have a website built in Ruby on Rails. My site has a webpage, located at “example.com/communityboard”, that you can use to enter a separate Community area. The community area is built with bbPress.

    I want users who type in the URL “example.com/community” to be redirected to “example.com/communityboard” . It used to work this way, but for some reason, the redirect no longer works in any browser but IE.

    We accomplished this redirect by placing an index.html file in the /community folder where bbPress had been installed. The entire code for the index.html file reads

    <meta http-equiv="refresh" content="0;url=http://example.com/communityboard">

    Back when we built the site, I was told that a meta refresh redirect using an index.html file was the best option. The redirect had to address ONLY a single page (http://example.com/community) and not all of the sublevels of the community bb (which lives at http://example.com/community/index.php). Otherwise, the community bb and all of its sublevels would be redirected.

    So… my questions:

    Why is the meta refresh redirect not working anymore? How can I fix it?

Viewing 5 replies - 1 through 5 (of 5 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    Assuming you’re running on some sort of Linux server, you’ll want to use an .htaccess file and research how to redirect pages from one place to another. Tons of articles available with a Google search on how to make this happen.

    The meta refresh method is pretty janky, and won’t scale when you want to change a bunch of other links later on down the line.


    kevindp
    Member

    @kevindp

    Hi, John! I appreciate your help.

    I think that using the .html file method is the best approach because I only want to redirect “http://example.com/community&#8221; and not “http://example.com/community/index.php&#8221;. Wouldn’t the htaccess file redirect the entire bulletin board?

    After further inspection, the issue may be due to Appache. We migrated our site to a new server. Is there a way to see if Apache is no longer automatically recognizing “http://example.com/community&#8221; as “http://example.com/community/index.html&#8221;?

    Thanks for your advice!

    Kevin


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    You’re correct about the move to Apache and Linux. You’re incorrect about it redirecting your entire site. .htaccess *could* be used for that purpose, but it’s far far more powerful than only that, and can be used to more effectively accomplish what you need.


    kevindp
    Member

    @kevindp

    Thanks, John! Will you provide instructions on changing just that page with an edit to htaccess? My googling is not working out.

    I’ve got 2 htaccess files, both in my /public directory:

    defaults.bb-htaccess.php

    in the bbpress includes folder

    .htaccess

    in a data folder

    Thanks for your help!


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Don’t worry about defaults.bb-htaccess.php. It’s part of the version of bbPress that you’re using.

    No idea what your ‘data folder’ is, so can’t say for sure if it’s correct or not.

    And no, I can’t really just fix your problem for you. :) You’ll have to do some digging. Searching for something like “apache htaccess redirect” should be all you need to do.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar