Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Page name dilemma

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

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 784 Views
  • marcpare
    Avatar
    Community Member
    5 Posts

    Page name dilemma Link to this post

    I am having a problem with naming a page.

    I have mailed a product out and put in a "readme" file on the disc with a link that points back to my site ... but ... I called the link "www.mysite/readme.html" by mistake. Now that I have been warned by some of my clients, I find that I cannot create a page called "readme.html" on my SilverStripe site. Is there a way around this? When I try to save a page created as "readme.html" it saves it as "readme-html" Arghh!

    Am I missing something?

    Marc

  • Devlin
    Avatar
    Community Member
    215 Posts

    Re: Page name dilemma Link to this post

    You can use any suffix you like. Just create a 'readme' page.

    http://ss3.demo.silverstripe.org/about/
    http://ss3.demo.silverstripe.org/about.html

    Both works.

  • marcpare
    Avatar
    Community Member
    5 Posts

    Re: Page name dilemma Link to this post

    Thanks for the help and links.

    I created a "readme.html" but the page keeps getting renamed to "readme-html". Am I doing something wrong?

    Marc

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

    Re: Page name dilemma Link to this post

    Devlin is right - I hadn't noticed this! In ss3 seems you don't need to change the pagename: readme.html will automatically redirect to readme... It doesn't look like this works out of the box in 2.4.x though, at least not on my sites (?).

    Changing .html to -html is normal SilverStripe behaviour. Have you considered adding a redirect readme.html to readme in your .htaccess file?

  • marcpare
    Avatar
    Community Member
    5 Posts

    Re: Page name dilemma Link to this post

    Hi Devlin and Marti,

    Marti: thanks for the tip. I will just put a redirect as you said till it's no longer needed, seems like the most reasonable choice.

    Devlin: nice to see that ss3 will not have this problem. Just one less thing to worry about when we make such a mistake.

    Cheers,

    Marc

  • Devlin
    Avatar
    Community Member
    215 Posts
  • marcpare
    Avatar
    Community Member
    5 Posts

    Re: Page name dilemma Link to this post

    Unless I am wrong, we are using v.2.4.6 (at our last upgrade the version of SilverStripe disappeared from the admin windows). It won't let me add the dot before "html" extender -> ".html" but keeps changing it to "-html" both at the page name an at URL level. It sounds like something that may have been corrected in newer versions of 2.4.x.

    BTW ... is there a way to check which version we are on? Our IT guy is off on a short vacation. ;-)

    Marc

  • Devlin
    Avatar
    Community Member
    215 Posts

    Re: Page name dilemma Link to this post

    You don't need a 'readme.html' page at all. Just create one simple 'readme' page with a plain 'readme' as the URLSegment. Then open up your website, go to mysite.com/readme/ and change the trailing slash to '.html'... This works out of the box unless you did some fancy stuff with the controller. If this is the case, then you should define a redirect in your .htaccess file as martimiz suggested.

    I have mailed a product out and put in a "readme" file on the disc with a link that points back to my site ... but ... I called the link "www.mysite/readme.html" by mistake.

    I've read your post again and it occured to me that there is no TLD in your link. Well if you forgot the top level domain in your link (the .com thingy), then I'm afraid there is nothing you can do.

    is there a way to check which version we are on?

    Yeah. Install SS 2.4.9 at once -- or when you IT guy is back from vacation.

    784 Views
Page: 1 2
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.