Wildcard DNS for URL Redirection script

isputra

Well-Known Member
May 3, 2003
574
0
166
Mbelitar
Hi,

I already search on this forum and meet dgbaker on other thread but still can't find the answer of my problem.

I have a client that want to use url redirection script. This script required wildcard dns.

My client account attach to shared IP so to give him wildcard dns, i must edit httpd.conf and add *.domain.com to ServerAlias and restart apache.

This situation is not what i want, because restarting apache i will not do it unless when apache crash.

So, can I :
1. Give him wildcard dns without edit httpd.conf
2. Client can add this wildcard thing if he need it by himself (maybe through WHM).

Remember, this client use shared IP for his account. Search on google and find some mod rewrite rule but all failed.

Is this possible to do ?
 

simplestar

Well-Known Member
Nov 15, 2005
97
0
156
There's an option in frontend cPanel to forward or, if it's not there, you can add the feature. I know it can be done via .htaccess also. I agree on not making that change in httpd.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
Client can add this wildcard thing if he need it by himself
DNS yes it can be granted via WHM
Give him wildcard dns without edit httpd.conf
cant be done


as far as your redirection not sure what you want to redirect to file folder new domain but

first create an add on doamin in the cpanel's account anything.domain.com in my example i just used folder. Edit the text in red in the virtual host container . now your client can redirect his wild card subdomains where ever he/she wants using .htaccess :)




<VirtualHost xxx.xx.xxx.xxx>
ServerAlias www.folder.domain.com *.domain.com
ServerAdmin [email protected]
DocumentRoot /home/username/public_html/folder
BytesLog domlogs/folder.domain.com-bytes_log
ServerName folder.domain.com
ServerAlias folder.domain.com www.folder.domain.com
UseCanonicalName off

User username
Group username
CustomLog /usr/local/apache/domlogs/folder.domain.com combined
ScriptAlias /cgi-bin/ /home/username/public_html/folder/cgi-bin/
</VirtualHost>


then
and add this to .htaccess to the adon domain folder
RedirectMatch permanent ^(.*)$ http://www.redirectdomain.com
 
Last edited:

isputra

Well-Known Member
May 3, 2003
574
0
166
Mbelitar
Hi dalem,

I think on my first post already mention that i know how to give wildcard dns using *.domain.com at httpd.conf :

My client account attach to shared IP so to give him wildcard dns, i must edit httpd.conf and add *.domain.com to ServerAlias and restart apache.

This situation is not what i want, because restarting apache i will not do it unless when apache crash.
After read more thread on other forum that i found when search from google, i think that not possible to do it without editing httpd.conf
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
confused :confused:
because restarting apache i will not do it unless when apache crash
what do you mean by this ????

what do you think happens everytime you add a domain via whm or one of your clients adds a subdomain?

apache restarts
 
Last edited: