I've worked with a site quite a long time ago. I had one folder in the server that wasn't connected to Silverstripe. I tried to add another folder like that (folder that is secured with .htaccess and .htpasswd -files), but I remember there was somethings that should be done for some file, to get that folder work on it's own. But I don't remember what. And because english isn't my native language, I can't find the right words to search for an answer. Could someone help me with my problem.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
- Page 11(current)
- 2
- Next 10 entries
You'll need to refactor the rewriterules (or add an exception before the SS ones) to allow the request to go directly into the folder rather than to silverstripe's main.php. This is in the installation root .htaccess
css, js, image etc. files are already allowed for, but if you want to access some other kind of file, you must add an exception (eg. to execute PHP).
There's not really anything else other than that (that I can think of at least).
I'm not sure if I understood. So I should have .htaccess in my root folder? I search for the files and there is htaccess-file in sapphire-file, which is under the root file. But I don't know why I can't get the file visible. I need to check if there is some thing in my ftp-program why it isnt shown. (It's so hard to try to write about these thing with my bad english, not enough right words in my head :P )
Ok, now I got the htaccess-file shown, also in the root file. And in that folder, that is working on it's own, without silverstripe. In that htaccess-file there's just.
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
That working folder isn't protected by password.
I put this htaccess also to the new folder, that should be protected by password (and there's also .htpasswd-file) It does ask the password when trying to get to the page, but after clicking ok, it says "Sorry, there was a problem with handling your request." So that problem may not be about silverstripe-things anymore?
.htaccess are executed for each folder in the tree.
If you put the that .htaccess into your folder, SilverStripe's will be executed first, and try to handle the request. You need to modify the one in the silverstripe installation root.
website/.htaccess <-- this one.
website/framework
website/cms
...
website/yourfolder/.htaccess <-- this is where your .htpasswd or whatever will be
Do I need to write name of this "myfolder" to somewhere in that htaccess-file in the root directory?
This problem still isn't solved. Could someone kindly point some easy step-by-step guide how this should be done, what should be add to which folder/file?
I read another topic where someone was installilg wordpress-blog in the subfolder under silverstripe. In that topic was written
"The Wordpress subfolder I created was named /blog so I added the following line into my .htaccess file:
RewriteCond %{REQUEST_URI} !/blog
Everything seems to be working now"
I tried that too, but still I don't know how I should get the subfolder work as "blank", without silverstripe involved :/
- Page 11(current)
- 2
- Next 10 entries