You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
1. Set `AllowEncodedSlashes` in the server config (globally) or in the virtual host configurations to avoid decoding the encoded slashes that may cause issues for URLs. For instance, when retrieving products with a slash in the SKU via the API, you will not want that converted.
26
+
27
+
```conf
28
+
<VirtualHost *:443>
29
+
...
30
+
# Allow encoded slashes
31
+
AllowEncodedSlashes NoDecode
32
+
...
33
+
</VirtualHost>
34
+
```
35
+
23
36
## Important: Apache rewrites and .htaccess {#apache-help-rewrite}
24
37
25
38
This topic discusses how to enable Apache 2.2 rewrites and specify a setting for the [distributed configuration file, `.htaccess`](http://httpd.apache.org/docs/current/howto/htaccess.html){:target="_blank"}.
@@ -30,10 +43,6 @@ Magento uses server rewrites and `.htaccess` to provide directory-level instruct
30
43
{% include install/allowoverrides24.md %}
31
44
{% endcollapsible %}
32
45
33
-
{% collapsible Click to show Apache 2.2 instructions %}
34
-
{% include install/allowoverrides22.md %}
35
-
{% endcollapsible %}
36
-
37
46
{:.bs-callout-info}
38
47
Failure to enable these settings typically results in no styles displaying on your storefront or Admin.
39
48
@@ -105,10 +114,6 @@ To install the default version of Apache (Ubuntu 14, 16---Apache 2.4, Ubuntu 12-
105
114
106
115
{% include install/allowoverrides24.md %}
107
116
108
-
### Enable rewrites and .htaccess for Apache 2.2
109
-
110
-
{% include install/allowoverrides22.md %}
111
-
112
117
{:.ref-header}
113
118
Next steps
114
119
@@ -207,11 +212,92 @@ Installing and configuring Apache is basically a three-step process: install the
207
212
1. Continue with the next section.
208
213
209
214
{:.bs-callout-info}
210
-
Even though Apache 2.4 is provided by default with CentOS 7, you configure it like Apache 2.2. See the following section.
215
+
Even though Apache 2.4 is provided by default with CentOS 7. See the following section to configure it.
216
+
217
+
### Enable rewrites and .htaccess for CentOS 7
218
+
219
+
1. Open `/etc/httpd/conf/httpd.conf` file for editing:
220
+
221
+
```bash
222
+
vim /etc/httpd/conf/httpd.conf`
223
+
```
224
+
225
+
1. Locate the block that starts with:
226
+
227
+
```conf
228
+
<Directory /var/www/html>
229
+
```
230
+
231
+
1. Change the value of `AllowOverride` to `All`.
232
+
233
+
For example,
234
+
235
+
```conf
236
+
<Directory /var/www/>
237
+
Options Indexes FollowSymLinks MultiViews
238
+
AllowOverride All
239
+
Order allow,deny
240
+
Allow from all
241
+
<Directory>
242
+
```
243
+
244
+
{:.bs-callout-info}
245
+
The preceding values for`Order` might not workin all cases. For more information, see the Apache documentation ([2.4](https://httpd.apache.org/docs/2.4/mod/mod_authz_host.html#order)).
246
+
247
+
1. Save the file and exit the text editor.
211
248
212
-
### Enable rewrites and .htaccess for Apache 2.2 (including CentOS 7)
249
+
1. To apply Apache settings, restart Apache.
250
+
251
+
```bash
252
+
service apache2 restart
253
+
```
213
254
214
-
{% include install/allowoverrides22.md %}
255
+
{:.bs-callout-info}
256
+
Failure to enable these settings typically results in no styles displaying on your storefront or Admin.
257
+
258
+
### Enable rewrites and .htaccess for Ubuntu
259
+
260
+
1. Open `/etc/apache2/sites-available/default` file for editing:
261
+
262
+
```bash
263
+
vim /etc/apache2/sites-available/default
264
+
```
265
+
266
+
1. Locate the block that starts with:
267
+
268
+
* Ubuntu 12: `<Directory /var/www/>`
269
+
* Ubuntu 14: `<Directory /var/www/html>`
270
+
271
+
1. Change the value of `AllowOverride` to `All`.
272
+
273
+
An example for Ubuntu 12 follows:
274
+
275
+
```conf
276
+
<Directory /var/www/>
277
+
Options Indexes FollowSymLinks MultiViews
278
+
AllowOverride All
279
+
Order allow,deny
280
+
Allow from all
281
+
<Directory>
282
+
```
283
+
284
+
1. Save the file and exit the text editor.
285
+
286
+
1. Configure Apache to use the `mod_rewrite` module:
0 commit comments