nurkka Posted November 6 Share Posted November 6 I often have problems with the ProcessWire .htaccess file. As my clients are using different hosting providers and I am working with DDEV locally, I have to deal with htaccess issues very often. The main problem seems to be the directive `Options +FollowSymLinks` and `Options +SymLinksifOwnerMatch`, but sometimes also the other options, which are marked as error 500 critical in the ProcessWire htaccess file. Currently, I have a project with two different htaccess files, because the staging and production server allow and deny different options. - Is `Options +FollowSymLinks` or `Options +SymLinksifOwnerMatch` really needed? Or can they be omitted? Link to comment Share on other sites More sharing options...
bernhard Posted November 6 Share Posted November 6 Both directives are needed if you have symlinks in your setup, which will be the case if you use RockMigrations deployments for example. If you don't have any symlinks I guess you could remove them, but I'm not sure if anything else needs them. I don't have any problems with DDEV. Link to comment Share on other sites More sharing options...
nurkka Posted November 6 Author Share Posted November 6 Thanks @bernhard , for the info, that RockMigrations deployments are using symlinks. I am using RockMigrations but not RockMigrations deployments (yet). So if ProcessWire doesn't use symlinks, I could simply comment out those two symlink directives and would have only one version of my .htaccess to maintain. Do you or does anybody know if ProcessWire itself uses symlinks? Link to comment Share on other sites More sharing options...
bernhard Posted November 6 Share Posted November 6 11 minutes ago, nurkka said: So if ProcessWire doesn't use symlinks, I could simply comment out those two symlink directives and would have only one version of my .htaccess to maintain. Do you or does anybody know if ProcessWire itself uses symlinks? Or something like this? (untested, never used) <If "%{HTTP_HOST} == 'foo.ddev.site'"> Options +FollowSymLinks </If> <Else> Options +SymLinksifOwnerMatch </Else> Link to comment Share on other sites More sharing options...
nurkka Posted November 6 Author Share Posted November 6 Wow, I never thought that would be possible – although I am using something similar in my config.php 🙂 Thanks @bernhard ! Link to comment Share on other sites More sharing options...
poljpocket Posted November 9 Share Posted November 9 On 11/6/2024 at 5:40 PM, bernhard said: Both directives are needed if you have symlinks in your setup, which will be the case if you use RockMigrations deployments for example. If you don't have any symlinks I guess you could remove them, but I'm not sure if anything else needs them. I don't have any problems with DDEV. I am seeing the same as OP on many of our hosting partners: Some just won't allow you to use FollowSymlinks. Ever. This renders your plugin unusable on these installations. You should maybe mention this in your docs somewhere... Link to comment Share on other sites More sharing options...
bernhard Posted November 9 Share Posted November 9 11 hours ago, poljpocket said: This renders your plugin unusable on these installations. You should maybe mention this in your docs somewhere... I don't understand, could you please be more specific? Link to comment Share on other sites More sharing options...
poljpocket Posted November 10 Share Posted November 10 Well, what I mean is that your deployments function won't work on any installation which needed the .htaccess edited (= comment out FollowSymlinks line) for ProcessWire to run properly. If you are checking for symlink function and work around it if it's not available, I retract everything I said :). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now