-
Notifications
You must be signed in to change notification settings - Fork 477
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
Create .htaccess and updated public/.htaccess #213
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
+Options All –Indexes | ||
|
||
<Files .htaccess> | ||
order allow,deny | ||
deny from all | ||
</Files> | ||
|
||
<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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
+Options All –Indexes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess |
||
|
||
<Files .htaccess> | ||
order allow,deny | ||
deny from all | ||
</Files> | ||
|
||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
|
||
# Redirect to HTTPS | ||
# RewriteEngine On | ||
# RewriteCond %{HTTPS} off | ||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | ||
|
||
# Some hosts may require you to use the `RewriteBase` directive. | ||
# Determine the RewriteBase automatically and set it as environment variable. | ||
# If you are using Apache aliases to do mass virtual hosting or installed the | ||
|
@@ -16,6 +28,7 @@ | |
# absolute physical path to the directory that contains this htaccess file. | ||
# RewriteBase / | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-d | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is not necessary, as it allows directory listing (some hosts don't support There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This directive checks for a directory in the file system. These are the usual recommendations for configuring Apache Server. Here is an example of recommendations from the Slim documentation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, thanks |
||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^ index.php [QSA,L] | ||
</IfModule> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's enough to have that just in
public/.htaccess