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

change standard url


Go to End


2 Posts   1328 Views

Avatar
bebabeba

Community Member, 193 Posts

4 April 2011 at 9:55pm

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

Community Member, 16 Posts

7 April 2011 at 3:18am

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.