-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
36 lines (25 loc) · 1.3 KB
/
.htaccess
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
# Standard Input Variables for the Divi Theme
php_value max_execution_time 240
php_value max_input_time 90
php_value max_input_vars 3000
php_value memory_limit 512M
# Redirect everything (no matter whether it's non-https or with www.) to https://yourdomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Redirect http to https (but NOT www to non-www)
RewriteEngine on
# force ssl
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
# Redirect from NON-www to https://www.yourdomain.com (replace nextab.de)
RewriteEngine on RewriteCond %{HTTP_HOST} nextab.de [NC]
RewriteRule ^(.*)$ https://www.nextab.de/$1 [L,R=301,NC]
# Redirect from Domain a (in this case mitplanzumerfolg.de) to Domain b (alinawelfonder.com) via .htaccess and KEEP the deeplinks (so someone accessing mitplanzumerfolg.de/kein-plan will end up on alinawelfonder.com/kein-plan)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^ mitplanzumerfolg\.de$
RewriteRule ^(.)$ http://www.alinawelfonder.com/$1 [R=301,L]*
# Dynamically replace parts of the URL, e.g. https://url.com/LISTING/abc to https://url.com/COMPANY/abc
RedirectMatch 301 ^/listing/(.*)$ /company/$1