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 |
-
Customising urls - from /page-name/ to /page-name.html

30 June 2009 at 8:49am Last edited: 30 June 2009 9:02am
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.htmlSince /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)
-
Re: Customising urls - from /page-name/ to /page-name.html

7 April 2010 at 2:33am
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.
-
Re: Customising urls - from /page-name/ to /page-name.html

7 April 2010 at 8:45am
This has been asked (and solved) before: http://www.silverstripe.org/customising-the-cms/show/269222
| 919 Views | ||
|
Page:
1
|
Go to Top |


