WordPress.org

Ready to get started?Download WordPress

Forums

Want to use different wildcard name zzzzzzzz not * (14 posts)

  1. magix111
    Member
    Posted 1 year ago #

    I want to use zzzzzzz instead of * as my wildcard subdomain and have created an actual subdomain zzzzzzz and modified my httpd.conf to the following

    |*if SUB="zzzzzzzz"|
        ServerAlias *.|DOMAIN|
    |*endif|

    After doing this my subdomain site delivered a File Not Found error.

    Here is the .htaccess

    RewriteEngine On
    RewriteBase /blogs/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    I am running an apache Centos with DirectAdmin-

    What am I forgetting to do? Should I remove the * A record because keeping would seem to negate the benefit of the zzzzzzz wildcard?

  2. You ... can't.

    Wildcard is * for a reason. That's what it is. It's not a 'name' it's a code convention.

  3. magix111
    Member
    Posted 1 year ago #

    I understand it is a convention, but I thought it was possible to instruct httpd so that it is possible to use real subdomains

  4. You can use real subdomains but you can't replace the wildcard 'value'.

    What are you REALLY trying to do? Map a named subdomain AND have Wildcards at the same time? Cause that you can do :)

  5. magix111
    Member
    Posted 1 year ago #

    I have just installed domain mapping but haven't had a chance to work with it yet. What I would like to do is be able to use real subdomains like mail.domain.com - if I can accomplish that I will be happy

  6. How are YOU defining 'real' and not real subdomains?

    A 'real' subdomain to me is one I create in cpanel, like svn.domain.com, which points not to WP but to something else.

    Because that you can do out of the box with WordPress, it's just a matter of your httpd.conf and vhosts, and putting the 'defined' subdomains (I think that's what you mean by real) BEFORE the wildcard definition.

  7. magix111
    Member
    Posted 1 year ago #

    You are right, I used the wrong phrase - I want to be able to access mail.domain.com or servername.domain.com without ending up back at wordpress

  8. Right, that works out of the box on a normal, well configured, server :)

    By default, a server knows that wildcard means 'Any subdomain that IS NOT already defined.' You can totally have named and wildcard subdomains on the same box, no issues.

    If that's not happening, then you have an issue in your server setup. Without knowing any more details, I'll tell you the most common issue is when your vhosts (virtual hosts) are in an order than has it checking for wildcards first, and not last.

  9. magix111
    Member
    Posted 1 year ago #

    Hence the hope of using a zzz and I notice this is not an unusual problem and as a newbie on the server side I have a lot to learn. Presently, * is setup as an A record. Is this incorrect?

  10. I'm a mid-rank sever rogue :)

    There are multiple places where you have to set up wildcards, but before we jump into the crazy, let's confirm a couple things

    1) You have wildcard subdomains working: Y/N

    2) You have a named domain (say mail.domain.com) that is NOT working: Y/N

    3) Do you have cpanel or plesk or any server management tools on your account? If so, which one?

  11. magix111
    Member
    Posted 1 year ago #

    1) Wildcard subs are working?
    As example, the main site is MGx.com and a wildcard site is Cafe.MGx.com (under construction) "Cafe" is a wildcard.

    2) Meanwhile, mail is a cname to mgx.com but mail.mgx.com resolves to cafe.mgx.com as does servername.mgx.com - neither mail nor servername are actual subdomains (maybe that is the problem)

    3) Am using DirectAdmin as my control panel

  12. 2) Meanwhile, mail is a cname to mgx.com but mail.mgx.com resolves to cafe.mgx.com as does servername.mgx.com - neither mail nor servername are actual subdomains (maybe that is the problem)

    They're resolving to a SUBDOMAIN!?

    Well that's your problem. If done correctly, sdsd.mgx.com would take you to http://mgx.com/wp-signup.php?new=sdsd

    Everything you have goes to cafe.mgx.com/blogs/register (is that BuddyPress?) so that's what you messed up.

  13. magix111
    Member
    Posted 1 year ago #

    Well, I realize I have messed something up but am not clear how to fix it. Cafe is a wildcard subdomain and is the primary buddypress blog. Is there a setting in WP to fix or is the problem on my dns panel? httpd.conf?

  14. It's in either your DNS panel or your httpd.conf

    Do you have a server admin, or can your host lend a hand?

Topic Closed

This topic has been closed to new replies.

About this Topic