Jump to:

17691 Posts in 4607 Topics by 2180 members

General Questions

SilverStripe Forums » General Questions » Customising urls - from /page-name/ to /page-name.html

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba

Page: 1
Go to End
Author Topic: 919 Views
  • Hammy
    Avatar
    Community Member
    49 Posts

    Customising urls - from /page-name/ to /page-name.html Link to this post

    I have a quick question regarding the complexity of making the following changes to the way Silverstripe produces urls:

    From:
    /page-name/

    To:
    /page-name.html

    Since /page-name/ looks like a directory with possibly more files within that directory, is it possible to change the url rewriting to /page-name.html and if so what are the complications (if any)? Has anyone done this before?

    (Sorry if this question has been asked before - could only find references to path names like /section-name/page-name/ and not directly to having /page-name.html instead)

  • Yambo
    Avatar
    Community Member
    5 Posts

    Re: Customising urls - from /page-name/ to /page-name.html Link to this post

    I had the same issue with this, and there is actually a very simple way of achieving this.
    Change all the links on your site with the file extension on the end.

    So instead of; <a href="home">Home</a>
    change to: <a href="home.php">Home</a>

    This will still find the relevant page(s). Then as long as you use the home.php in your sitemaps then Google (or any other search engines) will index the page as home.php.

    Hope that helps.

  • Pigeon
    Avatar
    Community Member
    228 Posts
    919 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.