News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Problem with Pretty URLs and HTTPS

Started by OliverdelaRosa, July 18, 2017, 09:17:43 PM

Previous topic - Next topic

OliverdelaRosa

I have been  an user of SMF since 2008. With the time I stopped using forums for a while. However, when a friend asked me last week about a forum system I recommended him to use SMF in his project without any doubt. I have been fighting again some minor issues all the week, and I solved them, but now I have a problem that is superior to my knowledge. Maybe you can help.

My friend wants SSL and Friendly URLs in his forum, he is obsesed with SEO and all that stuff. I solved SSL with some mod_rewritting in the .htaccess files and the friendly URLs with a mod called "Pretty URLs". Everything goes fine when both solutions are not running at the same time, because if I put both of then to run the users are unable to post.

More precisely, with both things activated you go, for example, to create a net topic, you write it, you press "publish" button and... nothing happends, everything loads again and you need to write it again and again and again and never publish it. However, two things happens:

- If I delete the code that forces https in the .htaccess file everything works
- If I unistall the Pretty Urls mod everything works

Both things together... "BOOM!"

I tried to implement https with two diferent codes, both of them causes the issue:

# Redirigir HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ https://forodogs.com/$1 [R,L]


and

#Código mágico para las SSL
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]


Is there a way to have friendly URLs and SSL at the same time? Thank you for your help.

Kindred

There's is a support thread for each mod, and your issue is discussed and solved, I behave, in the prettyurls support thread.

Please do note to your friend, however, that prettyurls provides very little, if any, seo benefit. Use if for human friendly URLs, if you like,  but for seo, it doesn't really matter
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

You have to update your pretty urls root variable to be the https:// site url

Second topic on on this page https://code.google.com/archive/p/prettyurls/wikis/TroubleShooting.wiki
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

OliverdelaRosa

Finally I obtained the solution, was only to put in the settings that the URL is http, not https, and let the .htaccess handle all the https. Was a silly thing, like allways this things are. Thank you very much.

Vincent Volmer

Quote from: vbgamer45 on July 18, 2017, 11:20:54 PM
You have to update your pretty urls root variable to be the https:// site url

Second topic on on this page https://code.google.com/archive/p/prettyurls/wikis/TroubleShooting.wiki

Thanks! did it!

Advertisement: