Go Back  HTML Forums - Free Webmaster Forums and Help Forums > SERVER ADMINISTRATION > Linux Administration
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 09-29-2009, 03:33 PM
  #1
A2JC4life
Veteran (Level 7)
 
A2JC4life's Avatar
 
Join Date: Dec 2005
Location: Virginia, USA
Posts: 63
iTrader: (0)
A2JC4life is an unknown quantity at this point
Question Redirect problem

I just moved my blog, from blog.maindomain.com to www.maindomain.com. That went fine. I can't get the 301 redirect to work, though. If I type maindomain.com/blog/, then I get the new site, but if I type blog.maindomain.com, I get an error. This means my blog readers think my site isn't there!

I have a pretty standard Linux server setup, I think, with cPanel, Apache, PHP, etc. If I go into the subdomains section of the cPanel and redirect it from there, what kind of redirect will I get? I don't want to lose all of my search engine "juice."
__________________
Be blessed!
~Rachel R. <><
http://www.homeworksbest.net
A2JC4life is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2009, 08:20 AM
  #2
charlesandrews
Novice (Level 1)
 
Join Date: Sep 2009
Posts: 7
iTrader: (0)
charlesandrews is an unknown quantity at this point
I'm not familiar with cPanel, however you can set up a 301 redirect easily using a .htaccess file provided Apache has mod_rewrite turned on (I haven't seen any decent hosting setups without it). There is a decent explanation of how to set it up in this mod_rewrite guide, and the second example shows redirecting a subdomain to your main domain using:

Code:
RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-zA-Z0-9]+)\.yoursite\.com
RewriteRule (.*) http://www.yoursite.com/%1 [R=301,L]
Hope this helps.
charlesandrews is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2009, 10:16 AM
  #3
A2JC4life
Veteran (Level 7)
 
A2JC4life's Avatar
 
Join Date: Dec 2005
Location: Virginia, USA
Posts: 63
iTrader: (0)
A2JC4life is an unknown quantity at this point
As best I can tell, I don't have the ability to manually edit the .htaccess file. It doesn't show up anywhere, and I can't find any option anywhere to show hidden files. (I created one in a subdirectory at one point, and even that one doesn't show up anywhere.)
__________________
Be blessed!
~Rachel R. <><
http://www.homeworksbest.net
A2JC4life is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2009, 05:19 PM
  #4
drivle
Paladin (Level 15)
 
drivle's Avatar
 
Join Date: Mar 2001
Location: UK
Posts: 319
iTrader: (0)
drivle is on a distinguished road
Hello Rachel R.

I'm afraid I also am not familiar with cPanel but....

You should be looking for some sort of 'remote filter' - if you use an ftp client you will find this somewhere in the 'connect' properties.

If you find it (either in cPanel or the ftp client), you should set it to -a

...to show all files.
__________________
Woot!
drivle is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2009, 05:23 PM
  #5
A2JC4life
Veteran (Level 7)
 
A2JC4life's Avatar
 
Join Date: Dec 2005
Location: Virginia, USA
Posts: 63
iTrader: (0)
A2JC4life is an unknown quantity at this point
I found the way to show hidden files (and got the problem fixed); thanks, everyone!
__________________
Be blessed!
~Rachel R. <><
http://www.homeworksbest.net
A2JC4life is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2009, 05:25 PM
  #6
drivle
Paladin (Level 15)
 
drivle's Avatar
 
Join Date: Mar 2001
Location: UK
Posts: 319
iTrader: (0)
drivle is on a distinguished road
A further thought

oh, and here's a further thought on the redirect...

If you don't have mod rewrite installed, perhaps you could try this in your .htaccess...

Redirect blog.maindomain.com http://www.maindomain.com/

Good luck
__________________
Woot!
drivle is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-30-2009, 05:27 PM
  #7
drivle
Paladin (Level 15)
 
drivle's Avatar
 
Join Date: Mar 2001
Location: UK
Posts: 319
iTrader: (0)
drivle is on a distinguished road
Ah, I was a little slow there

Can you share the 'fix' with us, so that others can learn?
__________________
Woot!
drivle is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 04:00 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.