-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtaccess.txt
48 lines (31 loc) · 1.03 KB
/
htaccess.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#HTACCESS CODE:
##code to manipulate php value from .htaccess code
php_value memory_limit 256M
php_value post_max_size 256M
php_value upload_max_filesize 64M
php_value max_input_vars 1800
php_value max_execution_time 300
php_value max_input_time 300
##code to manipulate php value from .htaccess code
##code to remove public from url
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
##code to remove public from url
##code to redirect www with https
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.*)$ [NC]
RewriteRule (.*) https://www.%1/$1 [R=301,L]
##code to redirect www with https
## Redirect to error pages
RewriteCond %{REQUEST_URI} ^/404/$ [OR]
RewriteCond %{REQUEST_URI} ^/500/$
RewriteRule ^(.*)$ https://www.example.com/error-404 [L]
## Redirect to error pages
##remove index.php from url
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
##remove index.php from url
bnm