Hi all, im currently reading an ebook i bought recently about developing for wordpress (from the beginning) and it says, referring to 301 redirects within the .htaccess file: this part: “It was just a simple .htaccess redirect of the wp-config.php file (only for use on NON WordPress sites).†Basically saying you shouldnt use 301 redirect in .htaccess on any wp core files or folders. i read on a comment thread though: “PHP loads the file (any include for that matter) locally, right from the file system. Apache has nothing to do with that. It’s no problem to use this even if you do run WordPress.†so is it ok to use this 301 or any 301 redirect within htaccess?
As far as I know it is fine. What would you do if you moved your site to a new domain? you have to use .htaccess in that situation.
I don't see how there's any problem with using 301 redirects in .htaccess with Wordpress sites. I do it all the time. However, if you're doing a 301 redirect to redirect non-www to www, you need to make sure that your WP_option's table is set to the same URL as the redirect is going to. Otherwise, it will most likely cause your site to break.