|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Redirect Question
I have a domain and the main webpage is not located at the root so I have it set to redirect. right now when someone goes to www.mywebpage.com it redirects to www.mywebpage.com/myrealwebpage/
This works fine but my site is also SSL and when someone goes to https://www.mywebpage.com it redirects back to the non SSL. Is there a way to detect if they are requesting SSL or not so if will redirect accordingly.. Thanks. ----Moved Thread To Web Servers By PostalCow---- |
|
#2
|
|||
|
|||
|
RE: Redirect Question
How is your virtual setup for the 443 port? Does it point to the same directory as you unsecure root web?
|
|
#3
|
|||||
|
|||||
|
RE: Redirect Question
You can use $_SERVER['HTTPS'] to see if it's secure or not. Here's the code I usually use for redirecting. $transfer is the URL to redirect to.
php Code:
|
|
#4
|
|||
|
|||
|
RE: Redirect Question
Honcho,
Thats one I never thought of. I'll use that. Thats a smarter easier way for him. ~cow |
|
#5
|
|||
|
|||
|
RE: Redirect Question
Thanks a ton, perfect.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Redirect Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|