What’s the point of the default .htaccess?

Ok, I figured this out: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] The single dot in the 3rd line matches any single character, but the replacement applies to the whole string. So, whatever URL you asked for, if it doesn’t match an existing file or directory name, is turned into a request … Read more

When accessing a wordpress blog, I want to force http when accessing wordpress via xmlrpc otherwise force https

The XML-RPC request is presumably to /xmlrpc.php in the root. In which case you can just make an exception for this at the very top of the .htaccess file (no need for the front-controller to be processed). For example: # Prevent remaining mod_rewrite directives to be processed RewriteRule ^xmlrpc\.php$ – [END] HOWEVER, WordPress itself is … Read more

Interaction of .htaccess, WP_HOME, and WP_SITEURL

for your sanity you should not put different sites in the same web “directory” it brings clutter and possible unindended interactions without gaining anything. WP_HOME and WP_SITEURL might be an historical artifact (even when I start to develop for wordpress at version 2.x I could not figure out who needs it) maybe from the times … Read more

Htaccess to redirect whole website to coming soon html page

To redirect an entire WordPress site to a specific HTML page using .htaccess, you can set up a redirect rule in the .htaccess file located in your site’s root directory. Add rewrite rules immediately after “RewriteEngine On” # Redirect all traffic to a specific HTML page RewriteEngine On RewriteCond %{REQUEST_URI} !^/specific-page.html$ # Prevent redirect loop … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)