Redirect domain to wp subdir?
-
I’m using PATHINFO instead of mod_rewrite for my wordpress because rewrites screw up my root .htaccess file. However I have a small problem, wordpress is installed in a subdir off the root called /content and what I want is for anybody who visits my domain / the below examples to be taken to /content .
http://www.mysite.com
http://mysite.com
http://www.mysite.com/index.shtml
http://www.mysite.com/index.htmlSimply. I want all of those to display wordpress from /content when somebody visits them but I have a problem. Several other domains are attached to my site so I use some code that makes them all go to http://www.mysite.com (i.e. http://www.moosite.com would become http://www.mysite.com). This avoids Google’s duplication penalty and ensures that “www” is always used, which I need for license reasons.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.ispreview\.co.uk [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.ispreview.co.uk/$1 [L,R=301]So how do I redirect visitors to my site to /content while also preserving this domain amalgamation call above?
This (step 3) seems like a good idea but it’s a bit messy if I do that for every domain. Surely there must be a simpler one size fits all solution? Ideally one that doesn’t break all my other root redirect’s like WP’s mod_rewrite code did before I scrubbed it 🙂 .
- The topic ‘Redirect domain to wp subdir?’ is closed to new replies.