-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess.bk
24 lines (16 loc) · 900 Bytes
/
.htaccess.bk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This file handles request for symfony projects that are installed in sub-directory (or shared server).
# If you run the project in a sub-directory or don't have access to the core apache configuration file
# Then, rename this file from ".htaccess.bk" to ".htaccess" and update the "RewriteBase" as required
RewriteEngine On
# Set the rewrite base to match your sub-directory
# If your project is installed in https://domain.com/project/symfony
# Then your rewrite base should be "/project/symfony/public"
# If your project is on the root directory (https://domain.com)
# Then your rewrite base would be "/public/"
RewriteBase /project-dir/public/
# Prevent further rewriting if the request ends with index.php
RewriteRule index.php$ - [L]
# If the loaded resource is not a file
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite any other request to /public/
RewriteRule ^(.*)$ index.php [L,QSA]