Skip to content

Commit f431db5

Browse files
authored
Merge pull request #1 from AiDirex/AiDirex-patch-added-pretty-urls
Update installation.md
2 parents f236302 + 7caef88 commit f431db5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

installation.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,30 @@ You may also want to configure a few additional components of Laravel, such as:
8888
- [Session](/docs/{{version}}/session#configuration)
8989
</div>
9090

91+
<a name="pretty-urls"></a>
92+
#### Pretty URLs
93+
94+
**Apache**
95+
96+
The framework ships with a `public/.htaccess` file that is used to allow URLs without `index.php`. If you use Apache to serve your Laravel application, be sure to enable the `mod_rewrite` module.
97+
98+
If the `.htaccess` file that ships with Laravel does not work with your Apache installation, try this one:
99+
100+
Options +FollowSymLinks
101+
RewriteEngine On
102+
103+
RewriteCond %{REQUEST_FILENAME} !-d
104+
RewriteCond %{REQUEST_FILENAME} !-f
105+
RewriteRule ^ index.php [L]
106+
107+
**Nginx**
108+
109+
On Nginx, the following directive in your site configuration will allow "pretty" URLs:
110+
111+
location / {
112+
try_files $uri $uri/ /index.php?$query_string;
113+
}
114+
115+
Of course, when using [Homestead](/docs/{{version}}/homestead), pretty URLs will be configured automatically.
116+
91117
Once Laravel is installed, you should also [configure your local environment](/docs/{{version}}/configuration#environment-configuration).

0 commit comments

Comments
 (0)