Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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 name dilemma


Go to End
Reply

9 Posts   797 Views

Avatar
marcpare

26 January 2013 at 10:42am Community Member, 5 Posts

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

Avatar
Devlin

29 January 2013 at 4:42am Community Member, 215 Posts

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.

Avatar
marcpare

29 January 2013 at 6:16am Community Member, 5 Posts

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

Avatar
martimiz

29 January 2013 at 7:37am Forum Moderator, 1091 Posts

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?

Avatar
marcpare

29 January 2013 at 4:04pm Community Member, 5 Posts

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

Avatar
Devlin

29 January 2013 at 9:16pm Community Member, 215 Posts

This works with 2.4.x too.

e.g. 2.4.9
http://www.tallship-company.com/the-ships/artemis/
http://www.tallship-company.com/the-ships/artemis.html

Avatar
marcpare

30 January 2013 at 11:20am Community Member, 5 Posts

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

Avatar
Devlin

30 January 2013 at 9:34pm Community Member, 215 Posts

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.

Go to Top