View Full Version : subdomain pointing to file, PLEASE read...
Ok, I have these lines in my .htaccess file:
RewriteCond %{HTTP_HOST} tools.notix.net
RewriteCond %{REQUEST_URI} !sub_tools.php
RewriteRule ^(.*)$ sub_tools.php$1 [L]
#NOTE: this points to a file, not a directory
Ok, now that I have that, inside the php file I have:
include("./dir/file.php");
Now, this won't work. It is still calling to the file in the htdocs directory, and /dir is in the htdocs directory. I don't understand why it won't include the file, and the hardest part is that I haven't found a way past this yet. Right now, I am using frameset... and it's terrible, I have about 6 MORE pages when I only need to have 3.
Can you PLEASE help me?
Thank You...
MarkHutch
2-14-03, 12:57 PM
Did you add the sub domain to your DNS via CName?
No, I did not. I did it just thought the .htaccess file, was I supposed to?
Thanks again...
MarkHutch
2-14-03, 08:03 PM
Yes, you must set up a CName to point to the sub-domain or it won't work. Sorry it took so long to reply. I was busy today.
It's ok that you responded late, because AT LEAST you responded, this is the 3rd time I've posted this in the last 2 months....
Thank You.
I am going to set it up right now, if I have some problems I'll let you know what happened.
I don't fully understand this. I usually just set up subdomains with .htaccess. How is this different?
Now, for Alias I have activate.notix.net and for Hostname I have www.notix.net. < that period is required right? (read at http://help.powweb.com/faqs/dns.php)
How does this work? Does it still use the .htaccess subdomain?
Does it use the files from the hostname, www.notix.net? I don't think so, because I tried it and it still didn't work...
I have read http://help.powweb.com/faqs/dns.php, but I still don't fully understand it.
Thank you so much, I hope we resolve this....
MarkHutch
2-14-03, 08:32 PM
I got a page when visit the sub domain you listed above:
Here's the header from that page: activate.notix.net
<head>
<title>//notix</title> <link href="tmp/ntx.css" type="text/css" rel="stylesheet"> <script language="JavaScript" src="tmp/fade.js"></SCRIPT><script language="JavaScript" src="tmp/notix.js"></SCRIPT><meta NAME="keywords" CONTENT="notix,chatx,xboard,affiliate">
<meta NAME="description" CONTENT="Great page! Come see!">
<meta NAME="generator" CONTENT="notepad">
<meta NAME="author" CONTENT="notix">
<meta NAME="copyright" CONTENT="copyright © 2002 notix.net, all rights reserved">
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta content="MSHTML 6.00.2600.0" name=GENERATOR>
<link REL="SHORTCUT ICON" HREF="http://www.notix.net/images/pageicon.ico">
<meta http-equiv="imagetoolbar" content="no">
</head>
I can't help you with the .htaccess problem, but I can tell you that you do not have to set up a CNAME record to use an .htaccess subdomain. We suggest that you do not make any changes to your DNS if you are at all unsure of the process. An incorrect DNS entry can disable your domain name completely.
mjp
Yes MarkHutch, but the page did not use the the one from www.notix.net/... If you go to www.notix.net/scripts.php you will see how it is supposed to look, those are both exactly same, the only difference is that one is a subdomain pointed to the file.
Do you see what I am saying... please say you do... I want to resolve this issue so bad...
[BTW, DONT FILL OUT THE FORM ON SCRIPTS.PHP, it is still under testing...]
thanks again...
MarkHutch
2-14-03, 08:44 PM
Thank you for the info. I didn't know that sub-domains would work without the CName change. I guess I learned something new today. I thought the * command just point anything.yourdomain.com back to the main index page. Thanks again for the information.
I thought I had some hope, I guess not.... could someone PLEASE help me...
thanks again....:confused:
PROBLEM SOLVED !!! WHOOPIIE!! I've been waiting 2 weeks for this moment.. here was the problem:
1. I was including head.php like this:
include("head.php");
Should of been like this, the correct way:
include("/www/n/notix/htdocs/head.php");
2. I included the CSS and JS file with the just the filename.css/js
Should of been: http://www.notix.net/....
I AM SO HAPPY!! LOL... thanks everyone!! sorry for the attitude...:p
:D :D :D :D :D
vBulletin v3.6.0, Copyright ©2000-2010, Jelsoft Enterprises Ltd.