News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

htaccess change?

Started by njtweb, August 27, 2019, 06:36:41 PM

Previous topic - Next topic

njtweb

I think I need to make a URL update and I'm not sure if it has to go in htaccess.

My site resolves to https://www. but not https://. When going to https:// the site is completely broken and I think it's causing indexing issues with webmaster tools.

https://youthhockeyinfo.com

If anybody knows how to fix that can you please respond?

Thank you

vbgamer45

First you have to use the repair settings tool and change all your http:// links to https://
Then we can work on .htaccess to force the redirect.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

njtweb

But everything works as https://www. Shouldn't the URL work both ways? For instance, with my other website if I type https://www and hit enter, it automatically changes to https:// and strips the www. It works both ways and resolves either way.

https://www.theyouthhockeynetwork.com

Sir Osis of Liver

In some cpanels, you can redirect http/https urls, I think it's in domain settings.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

vbgamer45

The resources are still pointed as http:// so they do need to be changed. it is not about www. or not

https://www.theyouthhockeynetwork.com looks like a different site to the one in your first post https://youthhockeyinfo.com
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

njtweb

I don't have any idea what that means :(

A while back, (last year) when I got my SSH cert, you fixed my site so it would resolve https. Which you did but it was pointed out to me the other day if browsed to by https:// with no www. the site is completely broken.

vbgamer45

We can just try to redirect non https://sitename.com to https://www.sitename.com instead

I am not sure why https://www would work...I would need to see the contents of .htaccess but for performance reasons it is better to do the repair_settings route.

https://youthhockeyinfo.com/ just upload repair_settings.php to that site .
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

You have to run repair_settings on the forum, it's not loading css.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

njtweb

I uploaded it but don't know what to do and I don't want to break anything.

njtweb

I have a big message that says I'm at a security risk because repair settings is not removed.

htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://www.youthhockeyinfo.com/$1 [R=301,L]



# POST AND PM INLINE ATTACHMENTS BEGINS
RewriteEngine on
RewriteRule attachment_(\d+)\.(\d+)_(\d+)\.pdf index.php?action=dlattach;topic=$1.$2;attach=$3
# POST AND PM INLINE ATTACHMENTS ENDS

vbgamer45

Try this



RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://www.youthhockeyinfo.com/$1 [R=301,L]


RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.youthhockeyinfo.com/$1 [L,R=301]

# POST AND PM INLINE ATTACHMENTS BEGINS
RewriteEngine on
RewriteRule attachment_(\d+)\.(\d+)_(\d+)\.pdf index.php?action=dlattach;topic=$1.$2;attach=$3
# POST AND PM INLINE ATTACHMENTS ENDS
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

njtweb

I'm confused, delete my htaccess and replace with yours?

vbgamer45

Opps mistyped try that .htaccess remove the repair_settings file.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

njtweb

Thank you very much, that worked. Is there anything I should look for to confirm nothing is broken with the change like Tinyportal or anything? But both https:// and www work. https:// redirects to www now.

vbgamer45

Should be good since your site already worked via www
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: