how to not have forum.php in the URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mermaid
    Senior Member
    • Mar 2008
    • 761
    • 3.6.x

    [Forum] how to not have forum.php in the URL

    When I click on the forum button in the navbar, I get domain.com/forums/forum.php

    How do I get it to just go to domain.com/forums/

    Likewise when I click on the Home button, it goes to domain.com/content.php (the CMS is at the root)

    How do I get it to just go to domain.com/ please?

    Thank you.
  • Matthew Gordon
    Senior Member
    • May 2002
    • 3243
    • 1.1.x

    #2
    For the CMS, change the Site Tab URL setting (Admin CP -> Settings -> Options -> Content Management). If you want it to just be domain.com/, setting it to / should do the trick.

    You can edit the navbar template and change each instance of
    Code:
    {vb:link forumhome}
    to the URL you want for the forums.

    Comment

    • Mermaid
      Senior Member
      • Mar 2008
      • 761
      • 3.6.x

      #3
      Originally posted by Matthew Gordon
      For the CMS, change the Site Tab URL setting (Admin CP -> Settings -> Options -> Content Management). If you want it to just be domain.com/, setting it to / should do the trick.
      No, that doesn't work it ends up with domain.com//


      Originally posted by Matthew Gordon
      You can edit the navbar template and change each instance of
      Code:
      {vb:link forumhome}
      to the URL you want for the forums.
      Thanks, but sounds a bit to techy for me.

      Comment

      • Matthew Gordon
        Senior Member
        • May 2002
        • 3243
        • 1.1.x

        #4
        Originally posted by Mermaid
        No, that doesn't work it ends up with domain.com//
        Sorry about that, I'll look at it more.

        Originally posted by Mermaid
        Thanks, but sounds a bit to techy for me.
        It's not that bad, just put the code above into the search box, click find, and replace it with your forums URL. It appears 3 times, so once you edit it, click "find" again to go to the next instance of it.

        Click image for larger version

Name:	navbar_changeforumurl1.png
Views:	1
Size:	38.7 KB
ID:	3687318

        Click image for larger version

Name:	navbar_changeforumurl2.png
Views:	1
Size:	38.5 KB
ID:	3687319

        Comment

        • Matthew Gordon
          Senior Member
          • May 2002
          • 3243
          • 1.1.x

          #5
          Originally posted by Mermaid
          No, that doesn't work it ends up with domain.com//
          Ah, it's because you have the CMS Component URL set, I forgot to take that into account.

          I think you should be able to leave the Site Tab URL setting blank in that case. I know it says it should never be left blank, but I think it should be fine.

          Comment

          • Mermaid
            Senior Member
            • Mar 2008
            • 761
            • 3.6.x

            #6
            Originally posted by Matthew Gordon
            Ah, it's because you have the CMS Component URL set, I forgot to take that into account.

            I think you should be able to leave the Site Tab URL setting blank in that case. I know it says it should never be left blank, but I think it should be fine.
            I tried that, it works, but i get a big red warning. Are you sure that's OK?

            One more problem.

            I have followed your instructions so that CMS is at the root. It is working, but as well as the CMS being at domain.com/ (or domain.com/content.php) it is also at domain.com/forums/

            Obviously this is wrong, I would like the forum to be at domain.com/forums/

            Comment

            • Matthew Gordon
              Senior Member
              • May 2002
              • 3243
              • 1.1.x

              #7
              Originally posted by Mermaid
              I tried that, it works, but i get a big red warning. Are you sure that's OK?
              Just make sure everything is still working fine. I think it should be alright, but I haven't thoroughly tested it myself.

              Originally posted by Mermaid
              One more problem.

              I have followed your instructions so that CMS is at the root. It is working, but as well as the CMS being at domain.com/ (or domain.com/content.php) it is also at domain.com/forums/

              Obviously this is wrong, I would like the forum to be at domain.com/forums/
              You mean if you go to domain.com/forums, it still pulls up the CMS? Edit index.php (in your forums directory), change this code:
              PHP Code:
              /**
               * Use the CMS as the default script:
               */

              require('content.php');


              /**
               * Use the forum as the default script:
               */

              // require('forum.php'); 
              to this:
              PHP Code:
              /**
               * Use the CMS as the default script:
               */

              // require('content.php');


              /**
               * Use the forum as the default script:
               */

              require('forum.php'); 
              (Move the // from the forum.php line to the content.php line.)

              Comment

              • Mermaid
                Senior Member
                • Mar 2008
                • 761
                • 3.6.x

                #8
                Originally posted by Matthew Gordon
                Sorry about that, I'll look at it more.


                It's not that bad, just put the code above into the search box, click find, and replace it with your forums URL. It appears 3 times, so once you edit it, click "find" again to go to the next instance of it.
                OK I have done that and it works a treat. Actually, when i said it's too techy, it isn't really. It's just that I hate changing templates as it aways seems to mess up upgrades, plus when I ask for technical support ticket, if I've customised the forum I have to remove all the customisations.

                Anyway that was easy and it works, thanks.

                Comment

                • Matthew Gordon
                  Senior Member
                  • May 2002
                  • 3243
                  • 1.1.x

                  #9
                  Originally posted by Mermaid
                  OK I have done that and it works a treat. Actually, when i said it's too techy, it isn't really. It's just that I hate changing templates as it aways seems to mess up upgrades, plus when I ask for technical support ticket, if I've customised the forum I have to remove all the customisations.

                  Anyway that was easy and it works, thanks.
                  Best way to handle that is to keep a default style with no parent and not to touch it unless you need to. Make it not user-selectable and just use it yourself when you are asked to check the default style.

                  Comment

                  • Mermaid
                    Senior Member
                    • Mar 2008
                    • 761
                    • 3.6.x

                    #10
                    Originally posted by Matthew Gordon
                    For the CMS, change the Site Tab URL setting (Admin CP -> Settings -> Options -> Content Management). If you want it to just be domain.com/, setting it to / should do the trick.

                    You can edit the navbar template and change each instance of
                    Code:
                    {vb:link forumhome}
                    to the URL you want for the forums.
                    Just upgarded to 4.2.0 and this hack had caused the Home button to disappear and forum button to redirect to activity stream. Reverting the navbar template cured it, but I now need another to do this,

                    ie redirect domain.com/forums/forum.php to domain.com/forums/

                    Any ideas please? (previous advice very helpful but does not seem to work with 4.2.0

                    Comment

                    • donald1234
                      Senior Member
                      • Oct 2011
                      • 1953
                      • 4.1.x

                      #11
                      That's default in 4.2.0 solution here.

                      Comment

                      • Gomjaba
                        Senior Member
                        • Jan 2005
                        • 970
                        • 3.5.x

                        #12
                        Originally posted by Mermaid
                        Just upgarded to 4.2.0 and this hack had caused the Home button to disappear and forum button to redirect to activity stream. Reverting the navbar template cured it, but I now need another to do this,

                        ie redirect domain.com/forums/forum.php to domain.com/forums/

                        Any ideas please? (previous advice very helpful but does not seem to work with 4.2.0

                        Under Settings > Navigation Manager set home to the default (and highest order) - which is what I have done.

                        You can even change it to point to a different URL

                        Click image for larger version

Name:	navbar.JPG
Views:	1
Size:	12.4 KB
ID:	3687355
                        I'm not under the alkafluence of inkahol like some thinkle peep I am!

                        Comment

                        • Mermaid
                          Senior Member
                          • Mar 2008
                          • 761
                          • 3.6.x

                          #13
                          Thanks all

                          Meanwhile I had worked that out myself, I should dick around a bit with new features before posting!

                          Comment

                          • Gomjaba
                            Senior Member
                            • Jan 2005
                            • 970
                            • 3.5.x

                            #14
                            Or read stickies

                            I'm not under the alkafluence of inkahol like some thinkle peep I am!

                            Comment

                            • Mermaid
                              Senior Member
                              • Mar 2008
                              • 761
                              • 3.6.x

                              #15
                              Originally posted by Gomjaba
                              All very well, but from the title, I saw nothing to think that sticky would answer my question.

                              - - - Updated - - -

                              Aha, it now seems I have a similar issue on another forum, but with content.php, and this time it doesn't help to set the default tab as in that sticky

                              Comment

                              Related Topics

                              Collapse

                              Working...