Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated syntax to apache 2.4. version. #314

Merged
merged 5 commits into from
Jul 23, 2023

Conversation

Vakrug
Copy link
Contributor

@Vakrug Vakrug commented Mar 4, 2023

Related to issue #313. Removed old 2.2. syntax and updated with the equivalent 2.4. syntax.

@eugene-borovov
Copy link

Why not do it as in the default configuration?

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

@Vakrug
Copy link
Contributor Author

Vakrug commented Mar 5, 2023

Why not do it as in the default configuration?

Because ".ht*" and ".htaccess" are different things, as the comment says (.htpasswd exists). This redirection to index page have nothing to do with .htpasswd.

@eugene-borovov
Copy link

This directive denies access to files with name starts with .ht. This rule is usually placed in the server settings, not the host. As you mentioned in the issue this directive could be deleted.

For redirection you only need rewrite rules.

<IfModule mod_rewrite.c>
  # Redirect to the public folder
  RewriteEngine On
  # RewriteBase /
  RewriteRule ^$ public/ [L]
  RewriteRule (.*) public/$1 [L]

  # Redirect to HTTPS
  # RewriteEngine On
  # RewriteCond %{HTTPS} off
  # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

@Vakrug
Copy link
Contributor Author

Vakrug commented Mar 5, 2023

OK, I deleted this directive.

@l0gicgate l0gicgate added this to the 4.6.0 milestone Jul 23, 2023
@l0gicgate l0gicgate merged commit 0de43e0 into slimphp:master Jul 23, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants