Forum Moderators: phranque
I tried.
RewriteCond %{HTTP_HOST} !^longisland\.domain\.com\Xbox_Services\$ [NC]
RewriteRule ^(.*)$ [longisland.domain.com...] [R=304,L]
AND
RedirectMatch 301 [longisland.example.com...] [longisland.example.com...]
AND
RewriteRule ^Xbox_Services/(.*) [longisland.example.com...] [R=301,L,QSA]
AND
Redirect 301 /Xbox_Services/(.*) [longisland.example.com...]
=============================
All of the above Do not work.
=============================
I'm sure looking at it your just saying to yourself NOOB... We'll help me out.
FYI I know in previous post you say be as descriptive as possible.
Well.. Inside of longisland.example.com/Xbox_Services we have subdomains as well.
Meaning...
longisland.example.com/Xbox_Services/Overheat
longisland.example.com/Xbox_Services/RedRing
longisland.example.com/Xbox_Services/Whatever
longisland.example.com/Xbox_Services/Overheat/TowelTrick
We need to just get rid of everything with the condition of Xbox Service
Ideally I want this to work because We are killing other subfolders as well:
RewriteCond %{HTTP_HOST} !^longisland\.domain\.com\Xbox_Services\$ [NC]
RewriteRule ^(.*)$ [longisland.domain.com...] [R=304,L]
In addition to these tiny errors, there's also some misunderstanding of server variable scope in evidence: For example, HTTP_HOST contains only the requested hostname, possibly with a port number appended. It does not contain any part of the requested URL-path. Conversely, the URL-paths examined by RedirectMatch and RewriteRule contain only the URL-path, and do not contain the requested protocol or domain name.
After looking through all those attempts, the following two lines were most salvageable:
RedirectMatch 301 /Xbox_Services/ http://longisland.example.com/
-or-
RewriteRule ^Xbox_Services/ http://longisland.example.com/ [R=301,L]
Jim