Http to Https redirection not working after site move

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Http to Https redirection not working after site move

Postby urzh » Sat Oct 14, 2017 1:36 pm

I moved some https sites to a new host. I kept the original .httaccess file but my redirects from http to https don't work. If I try a part of my site with http it gives me "GET / HTTP/1.1" 404 198

What else can I be checking on my host for this to work? Below is what my htaccess file has at the bottom currently and this was working fine for many years on my other host.

RewriteEngine On
RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33434
Joined: Sat Apr 05, 2008 9:58 pm

Re: Http to Https redirection not working after site move

Postby Webdongle » Sat Oct 14, 2017 9:05 pm

You shouldn't need to have to redirect.

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Sun Oct 15, 2017 1:25 pm

Why do you say that? I'd rather not have someone get a 404 not found if they accidentally mistype a non https page url....

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33434
Joined: Sat Apr 05, 2008 9:58 pm

Re: Http to Https redirection not working after site move

Postby Webdongle » Sun Oct 15, 2017 1:55 pm

urzh wrote:Why do you say that? ....

Because there is a setting in Joomla Global config Server(tab) for that.

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Mon Oct 16, 2017 11:32 am

Where?

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3077
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Http to Https redirection not working after site move

Postby ribo » Mon Oct 16, 2017 11:37 am

urzh wrote:Where?

Global Configuration-Server-Force HTTPS and this redirect http to https. No need any code to .htaccess to redirect as @Webdongle said.
chat room spontes : http://www.spontes.com

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Mon Oct 16, 2017 3:54 pm

I'm doing this already. I thought you still needed to create a directive to force http to https. It's not working for me this way in any case....


urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Mon Oct 16, 2017 6:57 pm

Ok, here you go.


Last PHP Error(s) Reported :: Forum Post Assistant (v1.3.4) : 16th October 2017 wrote:[16-Oct-2017 13:56:24 America/Chicago] PHP Warning: A non-numeric value encountered in /Applications/MAMP/htdocs/HAROLDSWESTLOOP.COM/templates/theme3249/includes/includes.php on line 132
Forum Post Assistant (v1.3.4) : 16th October 2017 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.8.1-Stable (Amani) 4-October-2017
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Writable (666) | Owner: --protected-- . (uid: 1/gid: 1) | Group: --protected-- (gid: 1) | Valid For: 3.8
Configuration Options :: Offline: 0 | SEF: 1 | SEF Suffix: 0 | SEF ReWrite: 1 | .htaccess/web.config: Yes | GZip: 1 | Cache: 0 | CacheTime: 40 | CacheHandler: file | CachePlatformPrefix: 0 | FTP Layer: 0 | Proxy: 0 | LiveSite: https://snapsterpiece.com | Session lifetime: 60 | Session handler: database | Shared sessions: 0 | SSL: 2 | FrontEdit: 1 | Error Reporting: none | Site Debug: 0 | Language Debug: 0 | Default Access: 1 | Unicode Slugs: 0 | Database Credentials Present: Yes

Host Configuration :: OS: Darwin | OS Version: 16.7.0 | Technology: x86_64 | Web Server: Apache | Encoding: gzip, deflate, br | Doc Root: --protected-- | System TMP Writable: Yes

PHP Configuration :: Version: 7.1.8 | PHP API: cgi-fcgi | Session Path Writable: Yes | Display Errors: | Error Reporting: 32767 | Log Errors To: /Applications/MAMP/logs/php_error.log | Last Known Error: 16th October 2017 13:56:24. | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: | Uploads: 1 | Max. Upload Size: 32M | Max. POST Size: 32M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 128M

MySQL Configuration :: Version: 5.6.35 (Client:mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $) | Host: --protected-- (--protected--) | Collation: utf8_general_ci (Character Set: utf8) | Database Size: 27.41 MiB | #of Tables:  154
Detailed Environment :: wrote:PHP Extensions :: Core (7.1.8) | date (7.1.8) | libxml (7.1.8) | openssl (7.1.8) | pcre (7.1.8) | sqlite3 (7.1.8) | zlib (7.1.8) | bcmath (7.1.8) | bz2 (7.1.8) | calendar (7.1.8) | ctype (7.1.8) | curl (7.1.8) | dom (20031129) | hash (1.0) | fileinfo (1.0.5) | filter (7.1.8) | ftp (7.1.8) | gd (7.1.8) | SPL (7.1.8) | iconv (7.1.8) | intl (1.1.0) | json (1.5.0) | ldap (7.1.8) | mbstring (7.1.8) | session (7.1.8) | standard (7.1.8) | mysqlnd (mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $) | PDO (7.1.8) | pdo_mysql (7.1.8) | pdo_sqlite (7.1.8) | Phar (2.0.2) | posix (7.1.8) | readline (7.1.8) | Reflection (7.1.8) | mysqli (7.1.8) | SimpleXML (7.1.8) | soap (7.1.8) | sockets (7.1.8) | exif (1.4 $Id: 8bdc0c8f27c2c9dd1f7551f1f9fe3ab57a06a4b1 $) | tokenizer (7.1.8) | wddx (7.1.8) | xml (7.1.8) | xmlreader (7.1.8) | xmlrpc (7.1.8) | xmlwriter (7.1.8) | xsl (7.1.8) | zip (1.13.5) | cgi-fcgi () | imap (7.1.8) | gettext (7.1.8) | mcrypt (7.1.8) | pgsql (7.1.8) | pdo_pgsql (7.1.8) | igbinary (2.0.1) | memcached (3.0.0b1) | Zend OPcache (7.1.8) | Zend Engine (3.1.0) |
Potential Missing Extensions :: mysql | suhosin |

Switch User Environment (Experimental) :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (777) | components/ (777) | modules/ (777) | plugins/ (777) | language/ (777) | templates/ (777) | cache/ (777) | logs/ (777) | tmp/ (777) | administrator/components/ (777) | administrator/modules/ (777) | administrator/language/ (777) | administrator/templates/ (777) |

Elevated Permissions (First 10) :: administrator/ (777) | administrator/cache/ (777) | administrator/components/ (777) | administrator/components/com_admin/ (777) | administrator/components/com_admin/controllers/ (777) | administrator/components/com_admin/helpers/ (777) | administrator/components/com_admin/helpers/html/ (777) | administrator/components/com_admin/models/ (777) | administrator/components/com_admin/models/forms/ (777) | administrator/components/com_admin/postinstall/ (777) |
Database Information :: wrote:Database statistics :: Uptime: 193484 | Threads: 1 | Questions: 1013442 | Slow queries: 0 | Opens: 48568 | Flush tables: 1 | Open tables: 64 | Queries per second avg: 5.237 |
Extensions Discovered :: wrote:Components :: SITE :: Unknown (-) 1 | Bluedream (4.0) 1 | Bubbles (4.0) 1 | Carbon (4.0) 1 | Elegant Blue (4.0) 1 | Elegant Green (3.5) 1 | Elegant Red (3.5) 1 | Elegant White (3.5) 1 | Elegant Yellow (3.5) 1 | Greenie (3.5) 1 | Hako (4.0) 1 | Nickel (4.0) 1 | Nomad (4.0) 1 | Origami (4.0) 1 | Pinky (3.5) 1 | Plain (4.0) 1 | Simplistic (4.0) 1 | Timeless (4.0) 1 | Vintage (4.0) 1 | Wireframe (4.0) 1 | Bluedream (4.0) 1 | Bubbles (4.0) 1 | Carbon (4.0) 1 | Elegant Blue (4.0) 1 | Elegant Green (3.5) 1 | Elegant Red (3.5) 1 | Elegant White (3.5) 1 | Elegant Yellow (3.5) 1 | Greenie (3.5) 1 | Hako (4.0) 1 | Nickel (4.0) 1 | Nomad (4.0) 1 | Origami (4.0) 1 | Pinky (3.5) 1 | Plain (4.0) 1 | Simplistic (4.0) 1 | Timeless (4.0) 1 | Vintage (4.0) 1 | Wireframe (4.0) 1 | WF_AGGREGATOR_DAILYMOTION_TITL (2.6.19) 1 | WF_AGGREGATOR_VIMEO_TITLE (2.6.19) 1 | WF_AGGREGATOR_VINE_TITLE (2.6.19) 1 | [youtube] (2.6.19) 1 | WF_FILESYSTEM_JOOMLA_TITLE (2.6.19) 1 | WF_LINKS_JOOMLALINKS_TITLE (2.6.19) 1 | WF_POPUPS_JCEMEDIABOX_TITLE (2.6.19) 1 | WF_POPUPS_WINDOW_TITLE (2.6.19) 1 | WF_LINK_SEARCH_TITLE (2.6.19) 1 | WF_ANCHOR_TITLE (2.6.19) 1 | WF_ARTICLE_TITLE (2.6.19) 1 | WF_AUTOSAVE_TITLE (2.6.19) 1 | WF_BROWSER_TITLE (2.6.19) 1 | WF_CHARMAP_TITLE (2.6.19) 1 | WF_CLEANUP_TITLE (2.6.19) 1 | WF_CLIPBOARD_TITLE (2.6.19) 1 | WF_CONTEXTMENU_TITLE (2.6.19) 1 | WF_DIRECTIONALITY_TITLE (2.6.19) 1 | WF_EMOTIONS_TITLE (2.6.19) 1 | WF_FONTCOLOR_TITLE (2.6.19) 1 | WF_FONTSELECT_TITLE (2.6.19) 1 | WF_FONTSIZESELECT_TITLE (2.6.19) 1 | WF_FORMATSELECT_TITLE (2.6.19) 1 | WF_FULLSCREEN_TITLE (2.6.19) 1 | WF_HR_TITLE (2.6.19) 1 | WF_IMGMANAGER_TITLE (2.6.19) 1 | WF_INLINEPOPUPS_TITLE (2.6.19) 1 | [Do not buy our kitchens!] (2.6.19) 1 | WF_LAYER_TITLE (2.6.19) 1 | WF_LINK_TITLE (2.6.19) 1 | WF_LISTS_TITLE (2.6.19) 1 | WF_MEDIA_TITLE (2.6.19) 1 | WF_NONBREAKING_TITLE (2.6.19) 1 | WF_PREVIEW_TITLE (2.6.19) 1 | WF_PRINT_TITLE (2.6.19) 1 | WF_SEARCHREPLACE_TITLE (2.6.19) 1 | WF_SOURCE_TITLE (2.6.19) 1 | WF_SPELLCHECKER_TITLE (2.6.19) 1 | WF_STYLE_TITLE (2.6.19) 1 | WF_STYLESELECT_TITLE (2.6.19) 1 | WF_TABLE_TITLE (2.6.19) 1 | WF_TEXTCASE_TITLE (2.6.19) 1 | WF_VISUALBLOCKS_TITLE (2.6.19) 1 | WF_VISUALCHARS_TITLE (2.6.19) 1 | WF_XHTMLXTRAS_TITLE (2.6.19) 1 | com_mailto (3.0.0) 1 | com_wrapper (3.0.0) 1 |
Components :: ADMIN :: com_admin (3.0.0) 1 | com_advancedmodules (7.2.2) 1 | com_ajax (3.2.0) 1 | Akeeba (5.6.0) 1 | com_associations (3.7.0) 1 | com_banners (3.0.0) 1 | com_cache (3.0.0) 1 | com_categories (3.0.0) 1 | com_checkin (3.0.0) 1 | com_config (3.0.0) 1 | com_content (3.0.0) 1 | com_contenthistory (3.2.0) 1 | com_cpanel (3.0.0) 1 | com_easyblog (5.1.12) 1 | com_fields (3.7.0) 1 | com_finder (3.0.0) 1 | FlexiContactPlus (11.05.02) 1 | COM_FORMMAKER (3.6.8) 1 | COM_GANTRY (4.1.33) 1 | com_installer (3.0.0) 1 | COM_JCE (2.6.19) 1 | JMap (4.3.6) 1 | com_joomlaupdate (3.6.2) 1 | com_languages (3.0.0) 1 | com_login (3.0.0) 1 | com_media (3.0.0) 1 | com_menus (3.0.0) 1 | com_messages (3.0.0) 1 | com_modules (3.0.0) 1 | com_newsfeeds (3.0.0) 1 | com_plugins (3.0.0) 1 | com_postinstall (3.2.0) 1 | com_profiles (1.5.0) 1 | com_redirect (3.0.0) 1 | com_search (3.0.0) 1 | com_tags (3.1.0) 1 | com_templates (3.0.0) 1 | com_users (3.0.0) 1 |

Modules :: SITE :: ARI Ext Menu (2.2.12) 1 | mod_articles_archive (3.0.0) 1 | mod_articles_categories (3.0.0) 1 | mod_articles_category (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | AS Superfish Menu (1.0.0) 1 | mod_banners (3.0.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_custom (3.0.0) 1 | DJ-Menu (2.0.2) 1 | EasyBlog - Archive Module (5.1.8) 1 | EasyBlog - Biography Module (5.1.12) 1 | EasyBlog - Calendar Module (5.1.8) 1 | Easyblog - Categories Module (5.1.8) 1 | EasyBlog - Image Wall Module (5.1.8) 1 | EasyBlog - Latest Bloggers Mod (5.1.12) 1 | EasyBlog - Latest Blogs Module (5.1.8) 1 | EasyBlog - Latest Comments Mod (5.1.8) 1 | EasyBlog - Posts List (5.1.8) 1 | EasyBlog - Most Commented Post (5.1.8) 1 | EasyBlog - Most Popular Post M (5.1.8) 1 | EasyBlog - Post Map Module (5.1.8) 1 | EasyBlog - Post Meta Module (5.1.8) 1 | EasyBlog - Quick Post Module (5.1.8) 1 | EasyBlog - Random Post Module (5.1.12) 1 | EasyBlog - Related Posts Modul (5.1.8) 1 | EasyBlog - Search Blogs Module (5.1.8) 1 | EasyBlog - Showcase Module (5.1.8) 1 | EasyBlog - Subscribe Module (5.1.8) 1 | EasyBlog - Subscribers Listing (5.1.8) 1 | EasyBlog - Tag Cloud Module (5.1.8) 1 | EasyBlog - Team Blogs Module (5.1.8) 1 | EasyBlog - Ticker Module (5.1.8) 1 | EasyBlog - Top Blogs Module (5.1.8) 1 | EasyBlog - Welcome Module (5.1.8) 1 | mod_feed (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_footer (3.0.0) 1 | Form Maker Module (3.6.8) 1 | TheGrue Menu (2.0.4) 1 | JF Mobile Menu (1.3) 1 | JSitemap module (4.3.6) 1 | mod_languages (3.5.0) 1 | mod_login (3.0.0) 1 | Maximenu CK (8.2.7) 1 | mod_menu (3.0.0) 1 | Phoca - GAE (3.0.3) 1 | mod_random_image (3.0.0) 1 | mod_related_items (3.0.0) 1 | RokNavMenu (2.0.9) 1 | mod_search (3.0.0) 1 | mod_stats (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_tags_similar (3.1.0) 1 | mod_users_latest (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_wrapper (3.0.0) 1 |
Modules :: ADMIN :: mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | JSitemap Quickicons (4.3.6) 1 | mod_latest (3.0.0) 1 | mod_logged (3.0.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_multilangstatus (3.0.0) 1 | mod_popular (3.0.0) 1 | mod_quickicon (3.0.0) 1 | mod_sampledata (3.8.0) 0 | Reset Hits module (2.0.2) 1 | mod_stats_admin (3.0.0) 1 | mod_status (3.0.0) 1 | mod_submenu (3.0.0) 1 | mod_title (3.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_version (3.0.0) 1 |

ßTemplates :: ADMIN :: hathor (3.0.0) 1 | isis (1.0) 1 |
Last edited by mandville on Mon Oct 16, 2017 8:29 pm, edited 1 time in total.
Reason: reformatted for readability. disable smilies is NOT the same as disable BB code. please read instructions properly.

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3077
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Http to Https redirection not working after site move

Postby ribo » Mon Oct 16, 2017 8:29 pm

Dont post fpa details in code, we cant see them. Post them straight.
chat room spontes : http://www.spontes.com

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33434
Joined: Sat Apr 05, 2008 9:58 pm

Re: Http to Https redirection not working after site move

Postby Webdongle » Mon Oct 16, 2017 8:46 pm

Two problems
1. You are using a permanent redirect ... get rid of it
2. https has to be set up on mamp ... https://gist.github.com/jfloff/5138826

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Mon Oct 16, 2017 10:42 pm

1. You mean the .htaccess lines here? I removed it now.


Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}



2. That's an old link and MAMP doesn't run in those directories and now come from /Library/Application Support/appsolute/MAMP PRO/conf when you edit the MAMP templates inside the app.

I've configured MAMP already and in their latest documentation they say to use a re-direct in htaccess or in an Apache. Either way it doesn't work. (Neither does method works)

http://documentation.mamp.info/en/MAMP- ... psMAMPPRO/
http://documentation.mamp.info/en/MAMP- ... sHTaccess/

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Mon Oct 16, 2017 10:43 pm

It's still something with MAMP I believe because this was working fine in my cpanel before I moved the sites with that custom .htaccess lines. But I hope you can still guide me please.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33434
Joined: Sat Apr 05, 2008 9:58 pm

Re: Http to Https redirection not working after site move

Postby Webdongle » Mon Oct 16, 2017 11:44 pm

All I can tell you is that with localhost on my laptop is that I have to manually type http://localhost then tell the browser to allow the certificate ... before I can get Global config to save 'force HTTPS. Only then does http:// redirect to https:// for the Joomla site.

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Tue Oct 17, 2017 10:58 pm

I figured it out. You need to create a non-ssl host in MAMP as well. I will document this and post back here. Thank you!

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 18438
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Http to Https redirection not working after site move

Postby leolam » Thu Oct 19, 2017 6:19 am

I moved some https sites to a new host
A webhost that uses Mamp? Since when do webhosts use Mamp?

Leo 8)
Celebrating 12-Years of Professional Joomla Support Services
- Joomla Professional Support:https://gws-desk.com -
- Joomla Specialized Hosting Solutions:https://gws-host.com -
- Member Joomla Bug Squad & J-CMS Release Team

urzh
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 14, 2013 2:18 am

Re: Http to Https redirection not working after site move

Postby urzh » Thu Oct 19, 2017 2:38 pm

leolam wrote:
I moved some https sites to a new host
A webhost that uses Mamp? Since when do webhosts use Mamp?

Leo 8)



Too shay.

https://becomethesolution.com/blogs/mac ... -redirects

Please close this!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33434
Joined: Sat Apr 05, 2008 9:58 pm

Re: Http to Https redirection not working after site move

Postby Webdongle » Thu Oct 19, 2017 3:31 pm

After step #4 of https://becomethesolution.com/blogs/mac ... -redirects no need for step #5. Just 'Force' ssl in Joomla Global config and http:// will redirect to https:.

As localhost will not have the certificate with your website name then you may need to register the certificate in your browser.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33434
Joined: Sat Apr 05, 2008 9:58 pm

Re: Http to Https redirection not working after site move

Postby Webdongle » Thu Oct 19, 2017 3:43 pm

leolam wrote:
I moved some https sites to a new host
A webhost that uses Mamp? Since when do webhosts use Mamp?

Leo 8)

Yep I initially thought the same but he did not say a new 'webhost' just 'host'. Although by inference it could be construed as a webhost. Nevertheless webhost or localhost there is no need to put a http: to https: redirect in the .htaccess because (when set in Global config) Joomla changes http: to https:

But if nothing else it shows how different people can interpret the same grammatical sentence in different ways.


Return to “Administration Joomla! 3.x”

Who is online

Users browsing this forum: AMurray and 7 guests