Announcement

Collapse
No announcement yet.

Wildcard Sub-Domains and .htaccess Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wildcard Sub-Domains and .htaccess Help

    Hello Everyone,

    I'm trying to set up a blogging site at bullony com. I used the RSP system to set up a wildcard domain, but the links are going to the *.bullony com diectory which is empty. I am told by the software vendor that there shouldn't be a directory at all, but the RSP system automatically creates it along with two sub-domains when setting up a wildcard: * .bullony com and *.*.bullony com

    RSP doesn't help with third party software so I wil post the.htaccess code here and plea for your help. Thank you very much.

    Code:
    # replace "domain.com" with your web site name lines 6,7
    
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} !^bullony.com [NC]
    RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).bullony.com [NC]
    RewriteRule ^$ /entries.php?blogname=%2 [L]
    
    RewriteCond %{HTTP_HOST} ^[^w]{3}[^\.]
    rewriterule admin$ http://www.bullony.com/admin [L]
    
    rewriterule ^([^-]+)-blogs$ blogs.php?keyword=$1 [L] #search blogs
    rewriterule ^blogs-page-([^-]+)$ blogs.php?page=$1 [L] #browse blogs with pagination
    rewriterule ^latest-page-([^-]+)$ latest.php?page=$1 [L] #browse blogs with pagination
    rewriterule ^([^-]+)-blogs-page-([^-]+)$ blogs.php?keyword=$1&page=$2 [L] #search blogs with keyword and pagination
    
    RewriteRule home$ index.php [L]
    RewriteRule blogs$ blogs.php [L]
    RewriteRule latest$ latest.php [L]
    RewriteRule favorite$ favorite.php [L]
    
    rewriterule ^blog-([^-]+)-keyword-([^-]+)$ entries.php?blogname=$1&keyword=$2 [L]
    
    rewriterule ^([0-9]+)-([^&]+)-page-([^&]+)$ entries.php?blogname=$2&page=$3 [L] # browse single blog with pagination
    rewriterule ^([0-9]+)-([^&]+)-([^&]+)-page-([^&]+)$ entries.php?blogname=$2&keyword=$3&page=$4 [L] # search single blog with pagination
    rewriterule ^([0-9]+)-([^&]+)\.entry$ entry.php?id=$1 [L]

    PS: What should happen is that when you visit a blog page it sends you to a virtual url/sub-domain like i****dvanced.bullony com where using php and mysql the blog page is rendered.
    Last edited by iads; 28-01-2014, 09:28 PM.

  • #2
    Nevernind!!! - Actually Support was very helpful in solving this problem. I usually get a message from them saying that they don't help with issues such as this, but this time I was wrong.

    Comment


    • doneritehosting
      doneritehosting commented
      Editing a comment
      Hmm that's weird you are getting responses from support like that iads... Truthfully rsp has been very helpful with any "crusade" I have tried over the past years... most other hosting companies will not consider supporting 3rd party though.

    • iads
      iads commented
      Editing a comment
      To tell the truth DoneRite, I've always suspected that I would get those answers when they didn't know the answer to the problem, but overall they have helped me out many times, on many issues. I always give them the highest reviews... I'm not going to mention any names, but there only seems to be one support staff member with less tolerance for lack of advanced knowledge whom shows it it the back and forth emails. Everyone else is great.

    • doneritehosting
      doneritehosting commented
      Editing a comment
      A Little Patience iads lmao!!!

      I had a cPanel reseller account with a company now listed in the top ten providers and their support was way worse than RSP's not only bad but rude too... I have problems believing they can be that popular.. clivejo will probably pick up on the company I have mentioned it to him a couple of times.

  • #3
    iads, would you mind posting the solution? Just in case someone else has the same problem.

    Comment


    • #4
      The problem was in the way I set up the wildcard domain. On another hosting provider I learned to make the sub.domain (*.domain.com) and then set it as the wildcard. On RSP all you do is create a regular domain and set it as a wildcard domain, and it automatically makes the sub.domain (*.domain.com) for you and allows the .htaccess to control it through the RewriteEngine.

      You will find the wildcard domain settings under "Advanced Setting" when you switch a domain from just being registered to being hosted. On the Hosted Domains page you must use the link in the upper right of the screen (Host domain), not the little icon on the same line as the domain name on the Registered Domains page.

      Comment

      Working...
      X