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.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
.htaccess issues/redirects
Old 03-17-2011, 01:12 PM .htaccess issues/redirects
Average Talker

Posts: 18
Name: Jon
Location: Southern California
Trades: 0
Hey there,
I have 1 "main domain" and several subdomains (subfolders) hosted together with GoDaddy. The main domain recently underwent some changes and I used 301 redirects...
i.e.
Code:
Redirect 301 /links.php http://www.main-domain.com/links.html
Redirect 301 /sitemap.php http://www.main-domain.com/sitemap.html
The above code worked/works fine - this is not my issue. I noticed that all my subfolders' "links" and "sitemap" files were redirecting to the main domain's files of the same name...undesirable effect. Remember, this is the main domain's .htaccess file.
I contacted GoDaddy who suggested I use the full domain path (which I had originally coded) and it did not work - the files returned a 404 Not Found like follows. I tried again today with the same results.
i.e.
Code:
Redirect 301 http:/www.domain.com/links.php http://www.main-domain.com/links.html
Redirect 301 http:/www.domain.com/sitemap.php http://www.main-domain.com/sitemap.html
The technical support rep. also suggested an "exception" code which can be placed into the main domain .htaccess which directs "it" to only apply these changes to a specific domain...voila...except they wouldn't or couldn't tell me what it was and suggested I begin Googling for my answer. I've tried researching it, but it's difficult to find an answer when searching for ".htaccess exceptions." One can imagine all of the results.

GoDaddy had told me that all of the sub-folders domain would be "exclusive" from one another which is one reason I decided to structure my sites this way, at their suggestion.

I should of left them the way they were and paid for seperate hosting on 5 sites, I know. I have since removed the redirects for conflicting files, however I am leary now that "other" .htaccess commands from the main domain will affect the other 4 sub-folders (domains)...any thoughts?

Structure clarification
main-domain (root)
/subfolder (www.sub-domain1.com)
/subfolder (www.sub-domain2.com)
/subfolder (www.sub-domain3.com)
etc.

Last edited by LoganKonlan; 03-17-2011 at 03:09 PM.. Reason: terminology clarification
LoganKonlan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-18-2011, 08:03 PM Re: .htaccess issues/redirects
Super Spam Talker

Posts: 878
Name: Paul W
Trades: 0
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .htaccess issues/redirects
 

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.35674 seconds with 12 queries