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.

Archive /

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

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

[SOLVED] Getting 404 in iFrame Fields

Go to End

2 Posts   2172 Views


Community Member, 904 Posts

1 March 2008 at 2:05am

Edited: 01/03/2008 7:29am

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.


Community Member, 904 Posts

1 March 2008 at 7:29am

Edited: 01/03/2008 7:30am

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.
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 with your domain :)
Hope that might help somebody.