PDA

View Full Version : Serviced Domain help - cgi-bin & custom error pages


airy
12-14-05, 04:45 PM
(I know these have been discussed before and Ive read thru many threads about this but decided to ask myself)

I have a Serviced Domain working with my main site...

My Serviced domain is in a directory under htdocs
Main Domain: htdocs/
Servied Domain: htdocs/newsite

Question is:

How do I get a different 404 error page for my newsite serviced domain? What .htaccess code do I need to use so I have 2 different error pages (1 for each site)

My current .htaccess code:

<Files .htaccess>
order allow,deny
deny from all
</Files>

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} newsite.com
RewriteCond %{REQUEST_URI} !newsite/
RewriteRule ^(.*)$ newsite/$1 [L]

ErrorDocument 403 /errorpage.html
ErrorDocument 404 /errorpage.html
ErrorDocument 500 /errorpage.html


Also, If I have a cgi mail form in the serviced domains site, do I have to anything specific to have it work like it was its own domain? or is it automaticly know to use the main roots cgi-bin without having to include my main domains url in the forms code!?

This all make sense!?

thank you 4 ur help ;)

extras
12-14-05, 09:03 PM
Did you put another errorpage.html in /www/U/USER/htdocs/newsite/ ?
If not try that.

As for the CGI, there are many ways.
1. I usually don't use cgi-bin, and the problem is solved.
2. You can put .htaccess (the same one) in cgi-bin, and create /www/U/USER/cgi-bin/newsite/
to put cgi for the 2nd domain in it, I guess.
3. You can treat these domain matters in the CGI script, too.

Please test and come back if you see something you don't like.
Don't forget to clear the browser cache and reload pages when you test. :)