Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2020, 03:32 PM
LucasA33's Avatar
LucasA33 LucasA33 is offline
Member
 
Join Date: Jul 2011
Posts: 144
Gender: Male
Credits: 12,241
LucasA33 is on a distinguished road
Default HTTPS and WWW Redirects

Good morning,

It's really great to see an update for this script. Although I'm having an issue with my site not being able to run after installation. I believe my version of PHP is too high on my server (7.2.24), so I wait for future compatibility updates.

In the meantime, I'm trying to see if there is a way to utilize the secure HTTP protocol. Any attempts to do this through conf file configuration and rewrite engine have failed. I have configured the vhost properly for HTTPS, and successfully tested it. Alas, once the script is installed, it no longer handles HTTPS requests properly.

Has anyone got it working?
__________________

Last edited by LucasA33; 12-27-2020 at 06:24 PM.
Reply With Quote
  #2  
Old 12-25-2020, 11:56 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,963
Kyttias is on a distinguished road
Default

I'm using https with my install. In the htaccess file, make sure this line says https instead of http if you're using https:

PHP Code:
RewriteRule https://%1%{REQUEST_URI} [L,R=301] 
Which unnecessary redirect are you referring to? After login? In view/loginview.php I simply replaced the page it lands on with an immediate redirect. (Note: If you're going to attempt to leave the existing code in, just make sure the header redirect is the first thing in the function and the rest is commented out. Any page rendering will break a header redirect.)

PHP Code:
public function index(){
    
header('Location: ' $_SERVER['HTTP_REFERER']);
}
    
public function 
logout(){
    
header('Location: ' $_SERVER['HTTP_REFERER']);


These ones bounce back to the last page you were on, alternatively, if you'd rather they end up at the index, use
PHP Code:
 header"Location: /" ); 
I'm actually in the process of doing the same with inventory and shop and various other places where a redirect feels more expected than a confirmation screen, but I haven't had time to dig into the exact functions.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #3  
Old 12-27-2020, 06:23 PM
LucasA33's Avatar
LucasA33 LucasA33 is offline
Member
 
Join Date: Jul 2011
Posts: 144
Gender: Male
Credits: 12,241
LucasA33 is on a distinguished road
Default

The .htaccess is actually a good solution for Apache users. I should have used the proper term "server block", but I'm using Nginx right now. I'm a bit rubbish though, so maybe I can get a workaround though the server block, as you did with the .htaccess file.

I retract my redirect statement, as I was just being dumb.
__________________
Reply With Quote
  #4  
Old 12-27-2020, 11:25 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,963
Kyttias is on a distinguished road
Default

Oh, I'm not sure how to get Mysidia working with Nginx at all, then. It uses .htaccess files to format how the urls are structured. You'll have to find some way of converting the .htaccess files that come with Mysidia into whatever Nginx uses, I guess?

(Unrelated, bc it may not help you, but with an .htaccess file you can also dynamically lower the php version used for a folder and all of its children... So even if you have a higher version installed, you can still force it to run an older version. I have more than just Mysidia on my domain and I need php7 for my other projects, but php 5.6 for Mysidia, ofc...)
PHP Code:
<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-lsphp56
</FilesMatch
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:58 AM.

Currently Active Users: 462 (0 members and 462 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636