|Easy| .htaccess problem subdomain|subfolder|force https|

Status
This thread has been locked.

IAmVolvic

Supreme
Feedback score
4
Posts
177
Reactions
49
Resources
0
Problem list,

1, when you type ( " https://tos.yulxvol.com " - it goes to " https://www.yulxvol.com/index.php " Could you fix it to only go to " tos.yulxvol.com " )

2, When you go to ( " tos.yulxvol.com " - it goes to " tos.yulxvol.com/TOS/ " Could you remove the /TOS/ subfolder? )

3, #! All domains must be forced HTTPS

============
I am using Apache ( Xampp Windows )


The code I have atm,



Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301]

The code is trying to force FTTPS on all domains think or folders, Not sure..
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

0rangeFox

The Fox Member
Supreme
Feedback score
17
Posts
411
Reactions
124
Resources
0
Problem list,

1, when you type ( " https://tos.yulxvol.com " - it goes to " https://www.yulxvol.com/index.php " Could you fix it to only go to " tos.yulxvol.com " )

2, When you go to ( " tos.yulxvol.com " - it goes to " tos.yulxvol.com/TOS/ " Could you remove the /TOS/ subfolder? )

3, #! All domains must be forced HTTPS

============
I am using Apache ( Xampp Windows )


The code I have atm,



Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301]

The code is trying to force FTTPS on all domains think or folders, Not sure..
Maybe this? Try please.

Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME} [R,L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteRule ^(.*)$ https://www.%{HTTP_HOST} [L,R=301]
 

IAmVolvic

Supreme
Feedback score
4
Posts
177
Reactions
49
Resources
0
So you want to redirect to tos.yulxvol.com?
I'm not 100% sure how it works.. But it is a subdomain[DOUBLEPOST=1529332163][/DOUBLEPOST]
Maybe this? Try please.

Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME} [R,L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteRule ^(.*)$ https://www.%{HTTP_HOST} [L,R=301]
I'll try it
 

Glitch

Website Developer
Supreme
Feedback score
32
Posts
426
Reactions
114
Resources
0
Try this:

Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) http://tos.yulxvol.com [R,L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteRule ^(.*)$ https://tos.yulxvol.com [L,R=301]
 

IAmVolvic

Supreme
Feedback score
4
Posts
177
Reactions
49
Resources
0
Try this:

Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) http://tos.yulxvol.com [R,L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteRule ^(.*)$ https://tos.yulxvol.com [L,R=301]
It didn't work. </3
 
Status
This thread has been locked.
Top