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

Automatic Page Forwarding


Go to End


2 Posts   874 Views

Avatar
alecn1519

Community Member, 1 Post

14 February 2011 at 8:41am

Hello. This is my first post here. I have set up a site using SilverStripe and I am loving it. However, there is one big issue. Before I installed SilverStripe, I had a directory set aside for some iPhone web-apps. In this case, lets say it is "http://example.com/iphone". Since I installed SilverStripe, everytime I try to access that directory/page, I get redirected to an error page generated by SilverStripe with the following error message:
"Page not found

Sorry, it seems you were trying to access a page that doesn't exist.

Please check the spelling of the URL you were trying to access and try again."

I am certain the directory is there, but I am unable to access/view it unless I remove my installation of SilverStripe. How can I fix this?

Avatar
Chris_Bryer

Community Member, 35 Posts

14 February 2011 at 6:53pm

You'll probably want to add a Rewrite Condition to your .htaccess in the root folder:

#Add The Following Line
RewriteCond %{REQUEST_URI} !^/iphone/

RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$) 
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]