Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » [SOLVED] Getting 404 in iFrame Fields

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1707 Views
  • banal
    Community Member
    901 Posts

    [SOLVED] Getting 404 in iFrame Fields Link to this post

    Hello all

    I'm experiencing strange problems after moving my SilverStripe Site from my local server to a Webserver.

    The site works fine, however if i log into the Backend, i get a "Page not found" Page inside the Image Upload and other IFrames. The URLs that cause the Error are formed like this:

    I don't have the slightest idea what could cause this error. Please help me out.

  • banal
    Community Member
    901 Posts

    Re: [SOLVED] Getting 404 in iFrame Fields Link to this post

    I was able to solve the issue myself.

    Somehow, the .htaccess File that comes with SilverStripe isn't compatible with all Apache Versions or doesn't work on all configurations.

    This was running on a subdomain eg. http://sub.somedomain.com
    Original rewrite rule:

    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [ L ]

    Which i replaced with

    RewriteRule ^(.*)$ sapphire/main.php?url=$1 [ L,QSA ]

    It does basically the same, i just rewrote it with my limited mod_rewrite Knowledge. $1 is the match from the rewrite Rule, the QSA flag keeps Query Strings and sends them to the rewrite "Target" as well. Maybe i should file a ticket for this...

    After that, iFrame Fields were showing up nicely. The base href tag was broken on all these pages though (same goes for urls with action and parameter, eg. with multiple slashes)
    I fixed this, by adding the following Line into my _config.php file (in my setup it was located in the mysite folder)


    Replace http://sub.somedomain.com with your domain
    Hope that might help somebody.

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.