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, Ed, biapar, Willr, Ingo, swaiba

Rewrite old files

Go to End

3 Posts   934 Views


Community Member, 141 Posts

5 July 2010 at 10:04pm

Hi all.
I launched the first two sites I made with SS last week. As on every relaunch I put some rewrites in the .htaccess file but SS rewrites them again hence they never get to my url.

Redirect permanent /development.php

URL =>

I tried RewriteRule (.*)development\.php [NC,R=301] as well but that results in an error 400.

Does anybody know how to rewrite my old files? Unfortunately redirect pages in SS are not helpful, because I can't type in development.php :(

Hope someone can help


Community Member, 904 Posts

5 July 2010 at 11:17pm

You should add the "L" flag (last) to your RewriteRule, eg. [R=301,NC,L] since that will prevent the execution of further rewrites if a match was found.


Community Member, 141 Posts

6 July 2010 at 7:20pm

I ought to have known better :)

Thanks, banal. Works fine with the L flag now