mod_rewrite capturing domain and tld
Posted
by
sameold
on Pro Webmasters
See other posts from Pro Webmasters
or by sameold
Published on 2013-06-30T01:49:55Z
Indexed on
2013/06/30
4:28 UTC
Read the original article
Hit count: 246
htaccess
|mod-rewrite
I'm using mod_write to rewrite this
www.variabledomain.variableext
to
http://my.com/variabledomain.variableext
Note that variabledomain
and variableext
are really variable, so I can't hardcode them.
I'm not an expert at mod_rewrite, but I thought something like would work, but it isn't. Any ideas what I should be doing instead.
RewriteRule ^(.*)\.(.*)\.(.*)$ http://my.com/$2\.$3 [R=301,L]
© Pro Webmasters or respective owner