21288 Posts in 5733 Topics by 2602 members
General Questions
SilverStripe Forums » General Questions » How to disable sapphire/silverstripe framework in directory
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
| Go to End | Next > | |
| Author | Topic: | 1505 Views |
-
How to disable sapphire/silverstripe framework in directory

14 January 2010 at 8:34am
i read it somewhere, at somepoint in time, but i can't find it again....
how do you disable the sapphire framework for a directory?example:
I have my site in public_html/
I made a subdomain dev.mysite linked to public_html/dev
I don't want sapphire/silverstripe running in this directory. -
Re: How to disable sapphire/silverstripe framework in directory

14 January 2010 at 9:02am
You can add a condition to the .htaccess rule for it to ignore requests to a given directory.
Add this in your .htaccess file above the RewriteRule.
RewriteCond %{REQUEST_URI} !^/phpmyadmin/.*
-
Re: How to disable sapphire/silverstripe framework in directory

17 November 2010 at 5:02am
This method no longer seems to work with the current build
Is there another way to accomplish this now?<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files><Files web.config>
Order deny,allow
Deny from all
</Files><IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/phpmyadmin/.*
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule> -
Re: How to disable sapphire/silverstripe framework in directory

17 November 2010 at 10:27pm
We have the following solution for this problem:
RewriteCond %{REQUEST_URI} !http://you.domain.com/directory
-
Re: How to disable sapphire/silverstripe framework in directory

18 November 2010 at 8:51am
just tried this with both the directory and exact page names as the rewrite condition, in both cases, the framework is still being applied
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !http://domain.com/post/page.ext
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule><IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !http://domain.com/post/
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule> -
Re: How to disable sapphire/silverstripe framework in directory

18 November 2010 at 10:20am
Personally, I just put a .htaccess in the subdirectory containing:
RewriteEngine Off
Also, if you are using mod_rewrite in the subdirectory, ensure that your rules have the L (last) flag.
-
Re: How to disable sapphire/silverstripe framework in directory

18 November 2010 at 10:26am Last edited: 18 November 2010 10:39am
rewrite off is the first thing i tried, is semi-applies the framework, no template, but it always shows the "home" page - assuming you use that in conjunction with the previous suggestion. If rewrite off is used alone, nothing changes what so ever and the full framework is applied and it shows page not found with your template/theme.
-
Re: How to disable sapphire/silverstripe framework in directory

18 November 2010 at 10:46am Last edited: 18 November 2010 11:04am
I appologize, the semi- thing was something else I tried previously.
Rewrite off does nothingpublic_html/.htaccess
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files><Files web.config>
Order deny,allow
Deny from all
</Files><IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !http://reiip.com/post/
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###
AddType application/download pdfpublic_html/post/.htaccess
RewriteEngine Off
| 1505 Views | ||
| Go to Top | Next > |



