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

change standard url


Reply

2 Posts   703 Views

Avatar
bebabeba

4 April 2011 at 9:55pm Community Member, 192 Posts

Hi!
I need rewrite Silverstripe url.
For example I have:
http://10.0.0.1/miosito/f1/f2?a=title&id=123
F1 and f2 are real page in my Silverstripe's tree in admin area.
I nees rewrite yrl in this way:
http://10.0.0.1/miosito/f1/f2/title/123
In this case title and 123 are not real page in my Silverstripe's tree in admin area. Is this possible? Where is the exact piont in witch Silverstripe decide that my url is not correct and show error page? Thanks!

Avatar
ekersten

7 April 2011 at 3:18am Community Member, 16 Posts

The Director class should be of help in this case

http://doc.silverstripe.org/sapphire/en/reference/director#custom-rewrite-rules

Basicaly, the default action of the f2 page should read the url parameters and act in consecuence.