.htaccess for Subdomain and Subfolder w/SSL

Typically if your subdomain’s root is the folder with WP installed, then just create a .htaccess file there. That always works for me. Example: public_html -> random etc.. mywpfolder (the wp folder) wp-admin wp-content etc.. .htaccess (create htaccess file here or simply copy/paste the primary one here) EDIT Do you have the other installs in … Read more

Forward blog requests to another URL

In your root .htaccess: RewriteEngine on RewriteRule ^blog/(.*)$ http://www.newdomainyouknow.com/blog/$1 [R=301,L] OR in your subfolder .htaccess RewriteEngine on RewriteRule ^(.*)$ http://www.newdomainyouknow.com/blog/$1 [R=301,L] You can remove all other entries. But this will move all request from one domain to the new domain : for example http://oldandboringdomain.com/blog/cool-staf will be redirected to http://www.newdomainyouknow.com/blog/cool-staf With 301 redirect (permanent) which mean … Read more

rewrite rule on plugin activation

finally I completed, using this below hook mod_rewrite_rules function output_htaccess( $rules ) { $new_rules = <<<EOD RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(\w+)$ ./index.php?id=$1 EOD; return $new_rules . $rules; } add_filter(‘mod_rewrite_rules’, ‘output_htaccess’);

htaccess rule to ignore specific subdomain [closed]

Have asked my hosting support to check my DNS and there were 2 entries because I added an A record in WHM and also added the subdomain to the account in cpanel, they have removed one and all is now working. Apologies for posting in WordPress, not technically WordPress related as I first thought.