21309 Posts in 5738 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » Rewite Engine on Apache is rewriting direct file requests..
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 971 Views |
-
Rewite Engine on Apache is rewriting direct file requests..

2 January 2011 at 4:04am Last edited: 2 January 2011 4:53am
Apache/2.2.14 (Ubuntu) - 2.3.7/silverstripe_version
In sapphire/main.php there is a comment that reads:* It's important that requests that point directly to a file aren't rewritten; otherwise, visitors
* won't be able to download any CSS, JS, image files, or other downloads.
*
* On Apache, RewriteEngine can be used to do this.
*
* @package sapphire
* @subpackage core
* @see Director::direct()
My server is doing exactly this. If I write in my domain name with no file name (e.g. www.myDomain.com) in the address bar my site works. If I write the domain plus a file name (e.g. www.myDomain.com/index.php) then I get the home page with no CSS, or Javascript etc. Using firebug I can see the some requests are messed up (e.g. http://assets, http://jsparty, http://sapphire).This came about because I recreated my site from an old backup after moving house and server. For some reason the original index.php was missing from all my backups except one.
I am not sure if the index.php I eventually did find is the right one for my Silverstripe version (version: 2.3.7). -
Re: Rewite Engine on Apache is rewriting direct file requests..

2 January 2011 at 5:30am
http://mySite.com/index.php/admin
Opens both Login page and then CMS with no Javascript and No CSS.http://mySite.com/admin
Open both Login page and then CMS perfectly with no errors.I am right to say that the only error I am having is that index.php is NOT being removed when it is used?
| 971 Views | ||
|
Page:
1
|
Go to Top |

