• Products
  • Demos
  • Learn
  •  
Products
Dating Software
100% ready dating site
Mobile Dating
Ready mobile dating apps with site
Dating Pro Enterprise
Will earn you 3 times more than any other dating software
Compare
Compare the packages and see what’s best for you
DATING SITE DEMO
iOS Demo
Android demo
Android demo
with in-app billing

How do I add .htaccess redirects?

To make it work, in the .htaccess file (may be invisible in your control panel, you’ll need to activate “show hidden files” option) in the root directory of your script add following redirect rules:

1. From www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

2. From non-www to www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

3. To https
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

4. From https to http
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

5. Complex redirect from the following host names:
http://example.com
http://www.example.com
https://example.com
to
https://example.com

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

If instead of example.com you want the default URL to be www.example.com, then simply change the third and the fifth lines:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301]

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...
Products
Dating Software
100% ready dating site
Mobile Dating
Ready mobile dating apps with site
Dating Pro Enterprise
Will earn you 3 times more than any other dating software
Compare
Compare the packages and see what’s best for you
Solutions
Promote your dating site
Start getting hundreds of daily registrations
Dating Pro Network
Populate your site with real people
VR/AR in dating and social networking
Virtual and Augmented reality
Adult dating
Adult-oriented web service
Matchmaking
Everything you need to start a business in matchmaking
Switch to admin mode