www redirect for wordpress

3 replies
I'm trying to redirect my wordpress directory to the "www" version of my domain. I have successfully done this in the root directory, however Wordpress has it's own .htaccess file and it's taking precedence.

So to clarify, I want my /blog/ directory to always redirect to www(dot)domain(dot)com/blog/. I'm not sure why I'm having problems, but everything I do just doesn't seem to work. Can anyone help?

This is the wordpress .htaccess file:

Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

# END WordPress
#redirect #wordpress #www
  • Profile picture of the author Tim Franklin
    have you checked your settings, file, wp-admin/options-general.php

    that is one method, I prefer to just direct traffic from the main control panel, depending on how your domain is setup, you might just be able to use the options as mentioned above
    Signature
    Bitcoin | Crypto | Blockchain Secrets |
    {{ DiscussionBoard.errors[3102249].message }}
    • Profile picture of the author Scott Baillie
      That's it. Under the General Settings tab, all I did was enter "www" in front of the two URL fields and it works great. Thanks for the swift kick in the arse.
      {{ DiscussionBoard.errors[3102292].message }}
  • Profile picture of the author Tim Franklin
    Glad I could point you in the right direction, )
    Signature
    Bitcoin | Crypto | Blockchain Secrets |
    {{ DiscussionBoard.errors[3102297].message }}

Trending Topics