Announcement

Collapse
No announcement yet.

how to not have forum.php in the URL

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

  • Matthew Gordon
    replied
    If you edit the Forum tab, you can change the Target URL to /forums/{session.sessionurl_q}

    The problem with that is that it will result in a endless redirect loop, so you also have to edit your index.php file:
    PHP Code:
    define('VB_REDIRECT'true); 
    Comment out that line so it looks like this:
    PHP Code:
    // define('VB_REDIRECT', true); 

    Leave a comment:


  • Mermaid
    replied
    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

    Leave a comment:


  • Gomjaba
    replied
    Or read stickies

    https://www.vbulletin.com/forum/show...t-Tab-in-4-2-0

    Leave a comment:


  • Mermaid
    replied
    Thanks all

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

    Leave a comment:


  • Gomjaba
    replied
    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

    Leave a comment:


  • donald1234
    replied
    That's default in 4.2.0 solution here.

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

    Leave a comment:


  • Mermaid
    replied
    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

    Leave a comment:


  • Matthew Gordon
    replied
    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.

    Leave a comment:


  • Mermaid
    replied
    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.

    Leave a comment:


  • Matthew Gordon
    replied
    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.)

    Leave a comment:


  • Mermaid
    replied
    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/

    Leave a comment:


  • Matthew Gordon
    replied
    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.

    Leave a comment:


  • Matthew Gordon
    replied
    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

    Leave a comment:


  • Mermaid
    replied
    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.

    Leave a comment:


  • Matthew Gordon
    replied
    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.

    Leave a comment:

Related Topics

Collapse

Working...
X