Announcement

Collapse
No announcement yet.

how to not have forum.php in the URL

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [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.

  • #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


    • #3
      Originally posted by Matthew Gordon View Post
      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 View Post
      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


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

        Originally posted by Mermaid View Post
        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


        • #5
          Originally posted by Mermaid View Post
          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


          • #6
            Originally posted by Matthew Gordon View Post
            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


            • #7
              Originally posted by Mermaid View Post
              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 View Post
              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


              • #8
                Originally posted by Matthew Gordon View Post
                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


                • #9
                  Originally posted by Mermaid View Post
                  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


                  • #10
                    Originally posted by Matthew Gordon View Post
                    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


                    • #11
                      That's default in 4.2.0 solution here.

                      https://www.vbulletin.com/forum/show...ading-to-4-2-0

                      Comment


                      • #12
                        Originally posted by Mermaid View Post
                        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


                        • #13
                          Thanks all

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

                          Comment


                          • #14
                            Or read stickies

                            https://www.vbulletin.com/forum/show...t-Tab-in-4-2-0
                            I'm not under the alkafluence of inkahol like some thinkle peep I am!

                            Comment


                            • #15
                              Originally posted by Gomjaba View Post
                              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

                              https://www.vbulletin.com/forum/show...php-in-the-URL

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X