homepage Welcome to WebmasterWorld Guest from 54.226.180.223
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
How to rewrite subdomain
rewrite subdomain
ivanvias




msg:4170096
 4:51 pm on Jul 14, 2010 (gmt 0)

Hi guys,

I have wildcard dns setup on my server. What I am trying to accomplish it to rewrite a subdomain to a php url.

I tried this:

#RewriteCond %{HTTP_HOST} ^[^\.w{3}]+\.mysite.com$
#RewriteRule ^$ %{HTTP_HOST} [C]
#RewriteRule ^([^\.w{3}]+)\.mysite\.com$ [$1.mysite.com...] [R=301,L]


This works however it keeps the subdomain in the url
and since it i am using joomla i cannot log into those pages because of the subdomain and the menus on the homepage have the subdomain on them and this cause my HOME link to point to the subdomain link i request. However, there is a solution in joomla to enable login, but what i really want to know is what is better for page ranking. Ive seen some sites with subdomains ranking higher for keyword in url which is optimally what id like if it does work.

For SEO purposes. Should i just create a component and have the subdomain redirect to the php url? Will this get indexed by google?

Or should i use this and hard code my menus and build my links to point to the subdomains on the homepage so that they get indexed instead?

 

jdMorgan




msg:4170329
 2:40 am on Jul 15, 2010 (gmt 0)

See similar basic problem here: [webmasterworld.com...]

If using the syntax and technique demonstrated in code in that thread doesn't clear up your problem post back here!

Jim

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved