Jump to content

Recommended Posts

Posted (edited)

I moved my forum to a subdomain because I want to track the stats separately from the rest of the site. The move went fine -- ht*p://forum/mysite.dom/ appears to be working correctly.

 

Unfortunately, so is ht*p://mysite.dom/forum -- I understand how subdomains work and that this is the actual folder and all that, but is there a way to redirect any traffic that happens to go here to the subdomain address (ht*p://forum.mysite.dom)? I want to make sure the traffic is counted in the subdomain's Awstats, not the main site's Awstats. I hope I'm making sense.

 

I'm just afraid trying something like a 301 redirect (ht*p://mysite.dom/forum to ht*p://forum.mysite.dom) will cause an internal server error, blow up the Internet, cause a rift in space/time, etc. (Kidding... but with my site at 400x the normal traffic for this month, I really don't want to cause an internal server error and lose this sudden new audience, even temporarily).

Edited by owatagal
Posted

TCH bruce is write (sorry very poor pun)

 

>RewriteCond %{HTTP_HOST}   ^[www\.]*sub-domain-name.domain-name.com [NC]
RewriteCond %{REQUEST_URI} !^/sub-domain-directory/.*
RewriteRule   ^(.*)  /sub-domain-directory/$1  [L]

 

Put that in your htaccess and that will rewrite your url

 

JimE

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...