Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Old 10-13-2011, 10:22 PM htaccess question
fog
fog's Avatar
Experienced Talker

Posts: 47
Location: Florida
Trades: 0
I am new at trying to edit the htaccess file.

This situation is pretty confusing to me and I hope I can state the problem in a clear way.

I have a client who has a page that needs to be redirected to another domain, so I added redirect 301 index.htm http://www.newdomain.com/ to the htaccess file. Worked like a charm, however...

The problem is that he has a sub domain on the first domain and every call to that second domain went to the newdomain.com

Does anybody have a solution? I have spent over an hour searching through the various forums here and have not found an answer. Thanks in advance.
__________________
Every artist was first an amateur.
Ralph Waldo Emerson
fog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-14-2011, 05:39 AM Re: htaccess question
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
The problem is that he has a sub domain on the first domain and every call to that second domain went to the newdomain.com
As it would! .htaccess affects the physical folder architecture of the website NOT the virtual structure.
So a .htaccess file in the root folder (public_html ) also applies the directives to all subfolders, and the default configuration for cPanel or Plesk creates subdomains as subfolders of public_html

Two possible solutions;

Remove and recreate the subdomain in a folder in the user folder so it is at the same level as public_html.

Make the redirect conditional to exclude requests for the subdomain.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to htaccess question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34955 seconds with 12 queries