title: .htaccess rules with wildcard subdomains
body: <p>I have looked and keep finding really similar solutions and I managed to get it working halfway.</p>
  
  <p>Solved first half:
  entered url: wildcard.domain.com points to domain.com/wildcard (and doesn't change url) GREAT!
  the .htaccess file code below does this.</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /
  
  RewriteCond %{HTTP_HOST} ^(?!www\.)([^.]+)\.pagebyme\.com$ [NC]
  RewriteCond %{REQUEST_URI}::%1 !^/([^/]+).*?::\1
  RewriteRule ^(.*)$ /%1/$1 [L]
  </code></pre>
  
  <p>Problem 2: if entered url is wildcard.domain.com/admin  shows wildcard.domain.com/wildcard/admin</p>
  
  <p>I don't want wildcard to show the second time. I just want the url to be wildcard.domain.com/admin</p>
  
  <p>What rule do I need to add?</p>
  
  <p>This is my first time using stackoverflow. Thanks in advance.</p>