Browse Source

Fix Apache URL rewriting (#16936)

tags/2.0.16
Bizley 6 years ago committed by Alexander Makarov
parent
commit
bca1e88fbd
  1. 8
      docs/guide/start-installation.md

8
docs/guide/start-installation.md

@ -218,15 +218,17 @@ DocumentRoot "path/to/basic/web"
<Directory "path/to/basic/web">
# use mod_rewrite for pretty URL support
RewriteEngine on
# if $showScriptName is false in UrlManager, do not allow accessing URLs with script name
RewriteRule ^index.php/ - [L,R=404]
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
# if $showScriptName is false in UrlManager, do not allow accessing URLs with script name
RewriteRule ^index.php/ - [L,R=404]
# ...other settings...
</Directory>
```

Loading…
Cancel
Save