insert_with_markers() WordPress & htaccess help

I would suggest an alternative route: the rewrite API – did you know it supports external URLs*? function wpse_199898_add_htaccess_rule() { // No need for the caret “starts with”, WP will add it add_rewrite_rule( ‘article/([/_0-9a-zA-Z-]+)$’, ‘http://www.domain.tld/?id=$1 [R=301,L,NC]’ ); } add_action( ‘init’, ‘wpse_199898_add_htaccess_rule’ ); *Almost. We just need a fix for WP’s quirky path prefixing: function wpse_199898_fix_htaccess_rule( … Read more

.htaccess file changes disappear

I was having a similar problem recently. It turned out it was due to a code injection in the /wp-includes/nav-menus.php file. There was a Base64 malware code injected that was causing my .htacess file to chmod itself to 444. Something called some kind of darkleech malware. See this link for more, maybe it’s what’s happening … Read more

How To Change the URL of a WordPress Multisite

These are the .htacess rules that fixed it. RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] #RewriteRule ^(.+)?/(wp-.*) /$2 [L] RewriteRule ^(.*?)/(wp-.*) /$2 [L] RewriteRule . index.php [L]

Installing wordpress on subdirectory 2 levels down

I managed to resolve this myself. Apologies for wasting anyones time. The fix was simple. I just had to add the following piece of code to my .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /jack/blog/ RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /jack/blog/index.php [L] </IfModule> Save my permalinks and the problem … Read more

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