.htaccess and Wordpress - subdirectories not rewriting -
i hosting multiple domains on single hosting account. 1 of domains using wordpress , in subdirectory (/foo), while other in main directory. have changed root .htaccess file rewrite main page of wordpress site correct domain, subsequent pages wordpress site not rewriting.
example: foo.com (wordpress site) bar.com (other site in root)
bar.com/foo being shown correctly foo.com....however bar.com/foo/page1 not rewriting , being shown (instead of foo.com/page1). looking rewrite , not redirect. .htaccess code i'm using in root folder below. haven't changed default .htaccess file created wordpress in bar.com/foo. missing something? appreciated.
rewriteengine on rewritebase / rewritecond %{request_uri} !^/foo/ rewritecond %{http_host} ^(www\.)?foo\. rewriterule ^(.*)$ foo/$1 [l]
how rewrite pages well?
if want requests bar.com/foo/page1
show foo.com/page1
in address bar, need redirect (not internal rewrite have above. this:
rewritecond %{http_host} bar\.com$ [nc] rewriterule ^foo/(.*)$ http://foo.com/$1 [r=301,l]
Comments
Post a Comment