Hello everyone!
I need some help with adding a second domain to point to a subdomain on my website. How my site currently works is:
1) a visitor to my site visits a page, such as allthingsinteresting.com/classifieds/browse-cat-54.htm
2) Apache, before looking for the page (which does not exist), find's the following lines of code in a .htaccess file located in my sites root directory:
#Config Stuff...
php_flag session.use_trans_sid off
############################################
################# mod GZIP! ###################
############################################
php_value zlib.output_compression 1
php_value zlib.output_compression_level 3
############################################
#### URL Rewriting Hack (See loadpage.php for more info) #####
############################################
RewriteEngine on
######### Ban Evil Robots..... ##########
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR]
RewriteCond %{HTTP_USER_AGENT} ^LinkWalker [OR]
RewriteCond %{HTTP_USER_AGENT} ^DIIbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^psbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule ^.* - [F]
######### Evil robots banned! ##########
######### Rewrite legitimate urls! ##########
RewriteRule ^.*\.htm loadpage.php [L]
RewriteRule ^.*\.html loadpage.php [L]
RewriteRule ^.*\.php* loadpage.php [L]
RewriteRule ^.*!\.* loadpage.php [L]
######### Legitimate urls rewritten! #########
3) The code instructs Apache to open a file called loadpage.php instead of the file which didn't exist.
4) Loagpage.php checks the enviroment variables and finds the name of the file the person was looking for, deciphers the friendly url into one it understands, fires up the templating engine and database abstraction library, includes the appropriate php file to generate the page the user wanted to see, builds the template and converts all the links in the page to friendly ones, echoes the contents of the finished page, and it's done!
This all works great with one url, but now I want my classifieds section to have a shorter url (safarri.com). I have already bought the domain name, so now what do I do?
I think the domain name dns needs to be configured to point to my server or something, and the .htaccess code may need to be modified too.
Thanks for your help!
P.S. Suggestions about my new classifieds site would be appreciated!
http://www.allthingsinteresting.com/classifieds (and hopefully soon) http://www.safarri.com