Hiding wp-content folder in URL with mod_rewrite
-
I’ve read so much forums and articles about how to do this. But while the question is always the same, the answer is always different and sometimes not reliable at all, even on WP.org forums. For example some peoples advice to add the following lines in .htaccess code:
RewriteEngine on RewriteRule ^/wp-content/(.*) /$1
But as I’m not an expert of using regular expressions or Apache modules, I can’t know the value of such an answer. That’s why I would like some help to reach my goal.
I’ld like to change the URLs on my blogs as follow:
https://www.mydomain.com/wp-content/anything/anyfile.php should appear as
https://www.mydomain.com/anything/anyfile.phpAnd if I find the right way to do it, do you think it could cause problems with plugins, uploaded files or anything located in the wp-content sub-directories?
Edit: or is it safer to rename the folder as explained HERE?
- The topic ‘Hiding wp-content folder in URL with mod_rewrite’ is closed to new replies.