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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Page name dilemma


Go to End


9 Posts   1779 Views

Avatar
marcpare

Community Member, 5 Posts

26 January 2013 at 10:42am

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

Community Member, 344 Posts

29 January 2013 at 4:42am

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

Community Member, 5 Posts

29 January 2013 at 6:16am

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

Forum Moderator, 1391 Posts

29 January 2013 at 7:37am

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

Community Member, 5 Posts

29 January 2013 at 4:04pm

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

Community Member, 344 Posts

29 January 2013 at 9:16pm

Avatar
marcpare

Community Member, 5 Posts

30 January 2013 at 11:20am

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

Community Member, 344 Posts

30 January 2013 at 9:34pm

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