Stop CMS redirecting to /content/

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rossco_2005
    Senior Member
    • Apr 2005
    • 465
    • 4.1.x

    [CMS] Stop CMS redirecting to /content/

    Hi,
    I have the whole of vbulletin in my site root.


    When I browse to http://site.com I should see the CMS Home.
    It does, but the problem is it redirects to http://site.com/content/
    How can I get it to stop redirecting like that, and just show content from the root?

    Mod Rewrite Friendly URLs is on with Enforce Strict Canonical.
    Last edited by rossco_2005; Sun 12 Dec '10, 6:38am.

    http://filesharingtalk.com

  • punchbowl
    Senior Member
    • Nov 2006
    • 3903
    • 4.0.x

    #2
    Not sure you can. In fact you can get to the situation that
    http://site.com
    http://site.com/content
    http://site.com/content.php?s=
    http://site.com/content.php?1-whats-new

    all return identical information.

    Comment

    • rossco_2005
      Senior Member
      • Apr 2005
      • 465
      • 4.1.x

      #3
      Originally posted by punchbowl
      Not sure you can. In fact you can get to the situation that
      http://site.com
      http://site.com/content
      http://site.com/content.php?s=
      http://site.com/content.php?1-whats-new

      all return identical information.
      Well those all redirect back to http://site.com/content/ luckily (exception being ?s=).

      Digitalpoint's site doesn't do the redirect, I asked him a few months ago what he changed and he said he didn't change anything. :wacko:

      http://filesharingtalk.com

      Comment

      • Andreas
        Senior Member
        • Feb 2004
        • 2323

        #4
        How can I get it to stop redirecting like that, and just show content from the root?
        You might want to try this Plug-in on Hook init_startup
        PHP Code:
        if ($_SERVER['REQUEST_URI'] == '/')
        {
            
        $vbulletin->options['friendlyurl_canonical'] = 0;

        Comment

        • rossco_2005
          Senior Member
          • Apr 2005
          • 465
          • 4.1.x

          #5
          That's great Andreas thanks!

          The only issue is that site.com/content/ does not redirect to /

          Is the only easy way to fix that through htaccess?
          Last edited by rossco_2005; Sun 12 Dec '10, 9:46am.

          http://filesharingtalk.com

          Comment

          • Andreas
            Senior Member
            • Feb 2004
            • 2323

            #6
            Originally posted by rossco_2005
            Is the only easy way to fix that through htaccess?
            Should be possible, yes - or you could use another Plug-in
            PHP Code:
            if ($_SERVER['REQUEST_URI'] == '/content/')
            {
                
            exec_header_redirect('/'301);

            Comment

            • rossco_2005
              Senior Member
              • Apr 2005
              • 465
              • 4.1.x

              #7
              Thanks, that did it.

              http://filesharingtalk.com

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...