News:

The anti-spam plugins have stopped being effective. Registration is back to requiring approval. After registering, you must ALSO email me with your username, so that I can manually approve your account.

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Databits

#736
General Chat / High Score!
September 04, 2005, 04:16:24 PM
Well I know we have a lot of oil here under Michigan, but you can't drill it because of the environmental protection bastards. You know, as far as I'm concerned, screw them, desperate times and all.

I also tend to wonder, if we have an east coast AND a west coast, why is it that the only place that can accept it is New Orleans?
#737
General Chat / High Score!
September 04, 2005, 07:34:04 AM
It was up to $3.29 / gallon here. Today it was back down to $2.97. But still! It's stupid... I say open our own oil wells exclusively to the U.S. and deny oil relations with the middle east and them 100%. That'll catch their attention.

They are ripping us off to no end. Why? WHY? What is the excuse this time? I would gladly buy an alternate fuel source vehicle. But with a worthless president in office who supports the oil industry (why wouldn't he? he has a hand in it himself), I can't see anything short of him being removed from office doing this situation any good.
#738
Technical Support / Lost in a Forum
September 03, 2005, 07:58:33 AM
Yeah, but there's no point in me writing all the systems, module based or not, in MySQL if they will need to switch to SQLite in a year. May as well hit it in just one shot. I'm assuming that SQLite is pretty much the same thing?
#739
Technical Support / Lost in a Forum
September 02, 2005, 03:04:07 PM
Damn, I suppose that means I should revamp the redesign of my site to SQLite instead of MySQL now.
#740
Hosting Q&A / ... Reopening?
September 01, 2005, 09:06:54 PM
As it currently stands, it looks like Xepher is going to finish off all the currently submitted applications before accepting new ones. I'd wager that when applications are open they will reopen on the new forums here. Just be patient, he'll get to it soon enough. Even Xepher has a life outside Xepher.net. ;)
#741
Hosting Q&A / Subdomains using server side .htaccess files
September 01, 2005, 07:04:18 PM
Ok, I have enic handling the dns again, I finally got it to work. Turned out that I was using far overcomplicated examples to do what I needed to do. Damn those people and their "examples", I used what I learned in my Linux class instead.


EDIT: Just in case anyone else is looking for a similar solution I'm going to show the code I used and explain things a little bit for you all.

.htaccess
QuoteRewriteEngine On
RewriteCond $1 !/$
RewriteCond $1 !.
RewriteRule ^(.+)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_URI} !^/.*
RewriteCond %{HTTP_HOST} !^www.domainname.com [NC]
RewriteCond %{HTTP_HOST} !^domainname.com [NC]
RewriteCond %{HTTP_HOST} ^([^.]+).domainname.com
RewriteCond /home//public_html/%1 -d
RewriteRule (.*) /%1/$1 [L]
What this code essentially does is redirects the document root to another folder based on whatever sub-domain you give. Multiple conditions automatically determine if the folder exists or not, and make sure that it's not a root domain I.E. www.domainname.com or domainname.com.

For example, the default root directory located under a username on this server is /home//public_html/. Using my domain as an example, both http://www.databits.cc/ and http://databits.cc/ point to this location.

Now when a user enters something as an alternate sub-domain, or something like subdomain.domainname.com the code above will parse out the subdomain part, check to see if /home//public_html/subdomain/ exists, then if it does redirect the document root to that location instead. As demonstrated using my site, when you goto http://test.databits.cc/ you will get the same thing as if you went to http://databits.cc/test.databits.cc/, http://www.databits.cc/test.databits.cc/, or even http://databits.xepher.net/test.databits.cc/. But more seemlessly to the user (my folder is actually named test.databits.cc, not just test).

Now, to explain some of this code in more detail...

QuoteLINE 1
QuoteRewriteEngine On
The first line for the code is required for the rest to work. It effectively does exactly as it says, turns on the rewrite engine.
QuoteLINES 2-4
QuoteRewriteCond $1 !/$
RewriteCond $1 !.
RewriteRule ^(.+)$ /$1/ [R=301,L]
These lines of code check for and add a trailing slash to the URL if it doesn't exist.
QuoteLINES 5-9
QuoteRewriteCond %{REQUEST_URI} !^/.*
RewriteCond %{HTTP_HOST} !^www.domainname.com [NC]
RewriteCond %{HTTP_HOST} !^domainname.com [NC]
RewriteCond %{HTTP_HOST} ^([^.]+).domainname.com
RewriteCond /home//public_html/%1 -d
These lines are the conditions list. All the conditions must be met before the following rewrite will occur. The first and second lines here check to make sure that the domain is not a root domain I.E. domainname.com or www.domainname.com. The following line parses out the subdomain from the front of the domain. The last line checks to see if a folder matching the subdomains name exists.
QuoteLINE 10
QuoteRewriteRule (.*) /%1/$1 [L]
This is the line that does the domain rewrite. If all the previous conditions were met, this line will redirect the document root to the specified subdomain's folder.
With a little revision, this code could be changed along with the directory structure under your public_html folder to prevent users from doing things like accessing subdomains from inside another subdomain. An issue I'm not addressing right now.

NOTE: If anyone is looking to do something similar and runs into issues, I have no problem helping you out. All you gotta do is ask. ;)
#742
Hosting Q&A / Subdomains using server side .htaccess files
September 01, 2005, 02:51:13 AM
I'm realizing I'm not getting any results... it is built into apache, but it's disabled by default. I'm not sure if it's enabled because I get absolutely no results when using any sort of RewriteEngine on code in the .htaccess file. Other things work however, such as Options -Indexes.

EDIT: Actually, I didn't have the DNS being managed by xepher.net, it was being hosted by enic.cc. I've changed it so that the databits.cc domain is managed by your server, but I need the MX record on my domain to be mx.enic.cc to continue to use the email forwarding I have set up.

Only problem is, I was unable to simply list xepher.net as a name server, instead I needed to use xepher.net and ns2.xepher.net (I had ns1.xepher.net in there too, all from a previous configuration).
#743
General Chat / Yet Another Favorite Band Thread...
September 01, 2005, 02:16:53 AM
I guess all good things come to and end. Maybe some day they will redeem themselves.
#744
Technical Support / Lost in a Forum
September 01, 2005, 01:21:00 AM
Considering I no longer have the PhpBB forum installed I'm not entirely sure about this... Being phase 2 I'm betting that you have some sort of easier database interface or reset. However, I'd bet your hostname is going to be something like .xepher.net. I'm not sure if Phase 2 people have hte same password for both their space and database.
#745
General Chat / Yet Another Favorite Band Thread...
September 01, 2005, 01:16:55 AM
Quote from: Ashley_RoseI was introduced to Aerosmith when I was 6. The love affair has only lessened when they wrote Jaded.
Yeah, I agree... Aerosmith really kinda hurt their reputation in my opinion when they came out with that album. Granted it seemed to be targeted at a newer generation, but it just... wasn't Aerosmith.
#746
Awesome, I'll look into it. I've been searching for awhile for the method to do this, but just as I was starting to run across the rewrite stuff I checked back here and found this. Thanks!
#747
Knowhow Trading Post / Apartments in Seattle
August 31, 2005, 08:54:59 PM
Can't say I know much about Seattle, I could give you estimates on apartments around Ann Arbor, Michigan though. :P
#748
Technical Support / Problem with FTP
August 31, 2005, 08:52:37 PM
For future reference, you may also try SSH secure file transfer. It works similar to FTP, but it's a tad more advanced, and I've never ran into any problems that you run into under FTP sometimes.
#749
Announcements / Google Talk
August 31, 2005, 08:48:22 PM
Yes... GAIM is multiplatform, thus there are Linux version(s) available here.
#750
Xepher, currently I'm working on a new version of my website. I know that under the kanar website, we were capable of setting up the subdomains such as test.kanar.org, to point to another directory which we called "test.kanar.org" without using things like php.

Now what I want to know, is if it is possible for me to write a server script (.htaccess) file in my public_html directory that would do just that.

I.E.

test.databits.cc would be directed to the public_html/test.databits.cc directory, as www.databits.cc or databits.cc would be directed to the public_html/databits.cc folder.

The only thing I've ever used .htaccess for was to prevent indexing of folders and set 404 error pages. So I'm not even sure if this is possible, but would rather not dabble in anything that could potentially screw something up for me or you.