teach me for $10 - wildcard subdomain - *.domain.com

Discussion in 'Apache' started by sageman, Sep 22, 2008.

  1. #1
    i have created a wildcard record for a subdomain in my CP. i am running plesk on my vps. when i type in http://anything.domain.com, it resolves to the server default page.

    now i don't want to redirect http://anything.domain.com to http://domain.com.
    instead, i want it to resolve to the httpdocs folder of http://domain.com without dropping the subdomain.

    in other words, i want http://anything.domain.com to use the httpdocs folder of http://domain.com as its root folder.

    eg. if i have a file name http://domain.com/something.html, i should be able to view that same file through http://anything.domain.com/something.html.

    i know this can be done in the httpd.conf file, but i am not sure how to access it through plesk.

    also, in my .htaccess file of http://domain.com, i have the follow rules below:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^(.*)$ http://domain.com/index.php [t=application/x-httpd-php,L]

    i want to add another wildcard directive so that it accepts requests from http://anything.domain.com as well... something like:

    RewriteRule ^(.*)$ http://*.domain.com/index.php [t=application/x-httpd-php,L]

    i am not sure of the correct syntax.

    counting oon your help.
    thanks!
     
    sageman, Sep 22, 2008 IP
  2. jliu

    jliu Peon

    Messages:
    235
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you know how to login to your server via SSH?
     
    jliu, Sep 22, 2008 IP
  3. sageman

    sageman Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no, i don't but i am willing to learn. if it is possible to make the changes through plesk, i will prefer that. i will pay through paypal.

    thanks!
     
    sageman, Sep 22, 2008 IP