Skip to content

Commit

Permalink
Merge pull request #8692 from kenjis/docs-running-add-htaccess
Browse files Browse the repository at this point in the history
docs: fix sample .htaccess code in running.rst
  • Loading branch information
kenjis authored Apr 2, 2024
2 parents 975f121 + b559dbd commit caa6080
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions user_guide_src/source/installation/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,30 @@ And edit **.htaccess** as follows:
Satisfy All
</FilesMatch>
And remove the redirect settings in **public/.htaccess**:

.. code-block:: diff
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -16,16 +16,6 @@ Options -Indexes
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
# RewriteBase /
- # Redirect Trailing Slashes...
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_URI} (.+)/$
- RewriteRule ^ %1 [L,R=301]
-
- # Rewrite "www.example.com -> example.com"
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
- RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
-
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to the front controller, index.php
Hosting with mod_userdir (Shared Hosts)
=======================================

Expand Down Expand Up @@ -505,6 +529,31 @@ And edit **.htaccess** as follows:
Satisfy All
</FilesMatch>
And remove the redirect settings in **public/.htaccess**:

.. code-block:: diff
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -16,16 +16,6 @@ Options -Indexes
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
# RewriteBase /
- # Redirect Trailing Slashes...
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_URI} (.+)/$
- RewriteRule ^ %1 [L,R=301]
-
- # Rewrite "www.example.com -> example.com"
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
- RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
-
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to the front controller, index.php
*********************
Bootstrapping the App
*********************
Expand Down

0 comments on commit caa6080

Please sign in to comment.