Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can I force a wordpress site to not use SSL?

Posted on 2015-01-14
11
Medium Priority
?
105 Views
Last Modified: 2015-02-18
Hey all, I have a wordpress site whose functionality breaks when using https. Is there any way to force http instead of https? Our main purpose is so that search engines and our AdWords ads redirect to the functional site.
Also, our current htaccess file currently has 177 lines, and I was wondering if it could be optimized in any way? You can find it here.

Thanks!
0
Comment
Question by:Harrison Walker
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40550376
You could start by removing the duplicates. This appears to be in there 5 times.
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Open in new window

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40550383
And the MIME types are probably unnecessary because most servers already support those.  I would remove that section and see if there are any problems.  Make a backup first.

For what it's worth, this is the entire .htaccess file for one of my busier sites.  It does not have Wordpress on it.
ErrorDocument 404 /404error.htm

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript

Open in new window

0
 
LVL 15

Expert Comment

by:Edwin Hoffer
ID: 40550518
Use this code in your .htaccess file:

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

Open in new window


Change domain.com to your domain name.

Hope it will help you.

Thanks
Edwin
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Harrison Walker
ID: 40551337
So I used the following:

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

It seems to work in Chrome, but in IE, I get a "Page cannot be displayed" - for my test, I'm going to Google and searching for "chicago real estate school", then clicking on the link, which is an HTTPS link.  Any idea why this wouldn't work in IE?  Thanks!
0
 
LVL 15

Expert Comment

by:Edwin Hoffer
ID: 40551399
clear your catch and try again.
0
 

Author Comment

by:Harrison Walker
ID: 40551419
Actually, I just realized that I need to do the opposite of what I've been doing - Google has indexed ALL of the pages of our site as HTTPS, so we need to switch all pages to HTTP, *EXCEPT* for those in our shopping cart subdirectory (/xcart).  I believe that there's an .htaccess file specific to our shopping cart, but wouldn't it get overruled by the site-wide .htaccess?  Thanks again for ANY help y'all can provide!
0
 

Author Comment

by:Harrison Walker
ID: 40551428
Edwin - I actually had our hosting company test it on a fresh machine, and they verified that it's an issue for them as well.  I was asking them whether there's something unique to their environment, and they assured me t at there isn't.  Thanks!
0
 
LVL 15

Expert Comment

by:Edwin Hoffer
ID: 40551591
When Google will re-crawl your website, the URL will automatically get changed, you should not worry about this.
0
 

Author Comment

by:Harrison Walker
ID: 40552384
Edwin - we currently receive a redirect loop in all browsers when implementing this code. Any ideas?
0
 
LVL 15

Expert Comment

by:Edwin Hoffer
ID: 40552787
Try to clear the cache or use incognito browser.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1500 total points
ID: 40552917
If you are seeing an infinite loop, something in your site is attempting to switch over to https and then it meets Edwin's rules and tries to go back to http and thus the loop starts.

I see what you want to do but if you are involved with taking money in any way, this sentence:

Hey all, I have a wordpress site whose functionality breaks when using https

Indicates that instead of working around the issue, you need to fix whatever it is that is breaking.  You would be far better off running your site completely under https (Google even rewards this in its algorithm) than figuring out how to kludge past it.  May I suggest trying this plugin:

https://wordpress.org/plugins/wordpress-https/

and seeing if it helps the issue or not?

Also, our current htaccess file currently has 177 lines, and I was wondering if it could be optimized in any way?

Probably should open a different thread for this question.  Dave's advice is solid (remove dupes, remove the mime stuff unless you absolutely need it).

From a WordPress-specific view, the WP Super Cache stuff is untouchable and probably the bulk of the file.

I'm also not a huge fan of the Perishable Press stuff as most of it is quite old and outdated now.  The list of bots is seriously out of date and doesn't do a darn thing against modern automated WordPress attacks. You could probably remove most of the stuff you found there and not suffer for it. You would be much better off installing BruteProtect and/or WordFence and letting it handle malicious access attempts.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question