Jump to:

23483 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Automatic Page Forwarding

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

Page: 1
Go to End
Author Topic: 575 Views
  • alecn1519
    Avatar
    Community Member
    1 Post

    Automatic Page Forwarding Link to this post

    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?

  • Chris_Bryer
    Avatar
    Community Member
    35 Posts

    Re: Automatic Page Forwarding Link to this post

    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]

    575 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.