I have wordpress installed in sub-directory
ex: example.com/wordpress/
but i wont it to redirect to www
ex: http://www.example.com/wordpress/
Thanks
yamen
I have wordpress installed in sub-directory
ex: example.com/wordpress/
but i wont it to redirect to www
ex: http://www.example.com/wordpress/
Thanks
yamen
Maybe try this in htaccess before your wordpress stuff or google "force www htaccess" there are different ways to write these lines.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule .? http://www.example.com%{REQUEST_URI} [R=301,L]\@dralezero -- the 3 lines you suggested worked perfectly for me with one exception. My wp-admin site was no longer accessible, as the redirect prevented me from getting to example.com/wp-admin/.
Is there a way to exclude the wp-admin site from the redirect? Or can I access the admin site from http://www.example.com/wp-admin somehow?
Thanks,
Jon
This topic has been closed to new replies.