.htaccess 301 vs. 302 Enforcing HTTPS

For WordPress, I have seen two different techniques to edit the .htaccess file for routing to HTTPS. What are the pros and cons of these: Option #1 RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] When navigating to www.example.com, this solution returns status 302 and routes traffic to https://www.example.com See here. Option #2 # … Read more

ab load testing

Can someone please walk me through the process of how I can load test my website using apache bench tool (ab)? I want to know the following: How many people per minute can the site handle? Please walk me through the commands I should run to figure this out. I tried every tutorial, and they … Read more

How to automatically redirect HTTP to HTTPS on Apache servers?

Environment Centos with apache Trying to setup automatic redirection from http to https From manage.mydomain.com — To —> https://manage.mydomain.com I have tried adding the following to my httpd.conf but it didn’t work RewriteEngine on ReWriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] Any ideas? 12 Answers 12

Apache Proxy: No protocol handler was valid

I am trying to proxy a subdirectory to another server. My httpd.conf: RewriteEngine On ProxyPreserveHost On RewriteRule .*subdir/ https://anotherserver/subdir/ [P] The problem is that Apache is always logging this: AH01144: No protocol handler was valid for the URL /subdir/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included … Read more

WordPress V2 REST-API: Endpoints 404?

I just installed and activated the latest version of the WP REST API plugin. However, when I attempt to access a REST endpoint, I end up with the Apache 404 page. $ curl -i ‘http://example.com/wp-json/wp/v2/posts/1’ HTTP/1.1 404 Not Found Date: Wed, 20 Jul 2016 01:23:25 GMT Server: Apache/2.4.18 (Unix) PHP/5.6.23 Content-Length: 219 Content-Type: text/html; charset=iso-8859-1 … Read more

Unable to modify(update) posts – Page not found

For couple of days I am experiencing issues with modifying some of my posts. When I try to modify the content of post, I get 404 error, redirecting me that page is not found. Doing Google research, with all basic tests, clear cache, browser, enable/disable plugins, changing permalinks, etc, I’ve found this on WP forum, … Read more

Does WP Have a Function To Generate .htaccess RewriteCond?

I know that I can edit .htaccess manually and add a RewriteCond statement inside, but I need to build a plugin that does this the proper way by using WP rewrites which then get pushed into .htaccess with flush_rewrite_rules(). I need RewriteCond in this case. Does WP have some obscure function that lets me push … Read more