Announcement

Collapse
No announcement yet.

renaming site pages url

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

  • renaming site pages url

    i am looking a way to change or rename the site pages url, the default system url gives the url as http://mysite.com/p/my-page-name

    i would like to change it as http://mysite.com/article/my-page-name.

    so instead of /p/ i need /article/

    please advice.

  • #2
    This can be done using the following trick.

    Step 1:

    Go to .htaccess in you root folder.

    Search:
    Code:
    RewriteRule ^p/([^/.]+)?$ pages.php?seo=$1&%{QUERY_STRING}
    Replace with:
    Code:
    RewriteRule ^article/([^/.]+)?$ pages.php?seo=$1&%{QUERY_STRING}
    Step 2:

    Go to templates/default/sidebar.tpl

    Search:
    Code:
    <li{if isset($nav) && $nav eq $menu[i].PAGE_URL} class="active"{/if}><a class="ajax-link" href="{$MasterUrl}/p/{$menu[i].PAGE_URL}"><i class="fa fa-angle-double-right"></i> {$menu[i].MENU_NAME|stripslashes}</a></li>
    Replace with:
    Code:
    <li{if isset($nav) && $nav eq $menu[i].PAGE_URL} class="active"{/if}><a class="ajax-link" href="{$MasterUrl}/p/{$menu[i].PAGE_URL}"><i class="fa fa-angle-double-right"></i> {$menu[i].MENU_NAME|stripslashes}</a></li>
    If at all, you manually create or add links on any of the pages, use your changed URL.

    Hope this clarifies your request.
    For issues, please submit support ticket here: http:///www.psmpl.com/helpdesk/
    http://obaas.com
    http://directoryinfographics.com

    Comment


    • #3
      thanks for the detailed instruction, i will try now and update you.

      Comment

      Working...
      X