Get rid of /content in url

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Older
    Senior Member
    • Sep 2003
    • 274
    • 3.0.3

    [CMS] Get rid of /content in url

    Any ideas how i remove /content from my URL and links in articles?
    Problems with vB4? Try This Thread for answers!
  • anthonyparsons
    Senior Member
    • Mar 2005
    • 2597

    #2
    You can change it via the ACP > Settings > Options > Content Management > CMS URL

    If you change that to "cms" then your url will be /cms/ instead of /content/. Saying that, you must also follow the directives within the help icon beside that selection, which outlines:

    Optional URL for your CMS.

    This may be specified to change the base URL for all CMS links. This is useful if you run the CMS from a location that differs from your Forum URL.

    You may specify an absolute URL such as http://www.example.com/, or a URL relative to your Forum URL. If your forum is in /forum and your CMS is at the root of your webserver then you may use ../. If you use an absolute URL the option Always use Forum URL as Base Path will have no effect for CMS pages, and the CMS url specified will always be used. If you wish to run your CMS from a location other than your Forum URL then you must ensure that the appropriate entry scripts have been set up. These include:

    * content.php or index.php
    * editor.php
    * list.php
    * widget.php

    The easiest way to do this is to create text files with the following:

    <?#shebang#?><?php
    define(VB_RELATIVE_PATH, 'your_forum_path');
    chdir('./' . VB_RELATIVE_PATH);
    require('script.php');

    For example, if your forum is in /forum then /widget.php may look like:

    <?#shebang#?><?php
    define(VB_RELATIVE_PATH, 'forum');
    chdir('./' . VB_RELATIVE_PATH);
    require('widget.php');

    Comment

    • sparwani
      New Member
      • Dec 2004
      • 6

      #3
      actually using that variable doesn't seem to do what i'm looking for. for example if i put in "whatever" it doesn't replace "content" it becomes "whatever/content"

      how do i get rid of content?

      Comment

      • anthonyparsons
        Senior Member
        • Mar 2005
        • 2597

        #4
        As above ACP page, you can rename content.php to index.php if you want, dynamically. You can just place a slant / in the field to rewrite content.php to your /.

        Comment

        • sparwani
          New Member
          • Dec 2004
          • 6

          #5
          I don't want to change content.php.. I already did that. What I want to change is the links to cms articles that are currently http://my.domain/content/12-content-title to something like http://my.domain/somethingelse/12-content-title

          is this possible?

          Comment

          • anthonyparsons
            Senior Member
            • Mar 2005
            • 2597

            #6
            That looks as though you are using the mod_rewrite function, so you would need to rewrite the rules in the .htaccess. You could also use something like VBSEO which has custom rewrite built in.

            Comment

            • sparwani
              New Member
              • Dec 2004
              • 6

              #7
              yes I can rewrite the rules in .htaccess so that http://my.domain/somethingelse/12-content-title will work (by being sent to content.php) but vbulletin will still hardcode links to http://my.domain/content/12-content-title which i dont want

              Comment

              • sparwani
                New Member
                • Dec 2004
                • 6

                #8
                it has something to do with the routes... still trying to figure it out but unfortunately the vb people do not believe documentation is important

                Comment

                • anthonyparsons
                  Senior Member
                  • Mar 2005
                  • 2597

                  #9
                  What you're asking is outside of vbulletin standard support though, as this is customising the standard software. Yes, documentation does suck, must give you that one.

                  I believe the area you are looking for though is /includes/class_friendly_url.php which contains the rewrite parameters generated.

                  Comment

                  • sparwani
                    New Member
                    • Dec 2004
                    • 6

                    #10
                    I'll take a look there, but it would be nice if it was covered in the manual with something like "the route prefix can not be changed without modifying source code" or if someone from vb replied in here

                    Comment

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