Forum Moderators: phranque
I want to make all pages from mysite.org/~someone/ appear from somethingelse.mysite.org
I've tried various RewriteRule lines, to no avail. The latest being:
Options +FollowSymlinks
RewriteEngine on
RewriteRule /(.*) [mysite.org...] [R L]
and
RewriteRule ^/(.*)$ [mysite.org...] [R]
I placed the .htaccess in the root folder for somethingelse.mysite.org . I've tried lots of other rewrite rules, but I can't remember them all. I either get a hung page which eventually times out or apache tries to show the directory listing for [somethingelse.mysite.org...] Any solutions? Thanks. :-)
Welcome to WebmasterWorld [webmasterworld.com]!
Drop the leading slash on RewriteRule patterns in the .htaccess context, and add a RewriteCond to prevent an infinite loop. Commas separating flags are non-optional:
RewriteCond %{REQUEST_URI} !^/~someone
RewriteRule (.*) http://mysite.org/~someone/$1 [b][R,L][/b]