.htaccess and 500 error, extra character added
Assuming you’re on Linux, if you go to your wp-content/plugins folder and run grep -R ‘htaccess’ * it should let you know if any plugins are addressing that file by name
Assuming you’re on Linux, if you go to your wp-content/plugins folder and run grep -R ‘htaccess’ * it should let you know if any plugins are addressing that file by name
WordPress uses those markers to put its rules between. I never have and never would put custom rules in there. Check out insert_with_markers() and save_mod_rewrite_rules() in wp-admin/includes/misc.php Most notably this comment block which answers your question: /** * Inserts an array of strings into a file (.htaccess ), placing it between * BEGIN and END … Read more
My suggestion is: use the same standard .htaccess configuration for WordPress on a single domain in each WordPress directory. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Along with it, add a small CODE to make sure users are redirected to the … Read more
Before I give you the CODE, let me explain a few points: Point 1: It’s better if you only allow https links. Mixing http & https for the same content breaks the security added by https. With http, you can never be sure that your visitors are shown the same page you are providing from … Read more
Edit your existing code to exclude the index.php from redirecting like this: RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/info/ RewriteCond %{REQUEST_URI} !^/index\.php$ RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L] For an explanation, check the answer to this question at Stackoverflow: Issue with .htaccess redirecting all pages to HTTPS except one .
The default .htaccess-file will already support the behaviour you want; # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress The magic is in the lines that start with RewriteCond. They instruct Apache to apply the rule RewriteRule … Read more
The PHP files in the wp-includes directory will do nothing when accessed directly. They are designed to be include()‘d in an existing PHP script, such as on the front-end or in the dashboard. Your Options -Indexes entry in the .htaccess file simply prevents a list of the files in a directory when no index.php is … Read more
If you place your “custom” directives outside of any # BEGIN … / # END … comment markers then WordPress (and plugins) should not overwrite them when they update. (Of course, if you have plugins that don’t “play nice” then they could do anything to .htaccess if you let them, so you would need to … Read more
Ok I figured this out and I am providing answer just for the case that someone else experiences this problem. The problem was in the plugin that was used on the original automatic installation of the WordPress done via Mojo Marketplace. The name of the plugin was Endurance PHP Edge and it was not in … Read more
It appears to prevent any POST requests to wp-login.php that aren’t made from a page on my-domain.com. When the browser sends a POST request, say after submitting a form, it will include a HTTP Referrer header telling the server where the request came from. This theoretically prevents bots submitting POST requests directly to wp-login.php as … Read more