Web Hosting Forum | Lunarpages

Author Topic: Subdomain not working  (Read 21764 times)

Offline jawks

  • Newbie
  • *
  • Posts: 2
Subdomain not working
« on: December 20, 2011, 01:31:32 AM »
I've upgraded to VPS hosting and now my subdomain is not working.

My actual domain is pointing to a specific folder. So, let's say that domain.com is really pointing to domain.com/ web

To do this you suggested to create a redirect with .htaccess, just like this:

RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} domain.com$
RewriteCond %{REQUEST_URI} !web/
RewriteRule ^(.*)$ web/$1


Now my subdomain (soporte.domain.com) is not working. It appears the following error:


Not Found
The requested URL /home/lkbit0/public_html/weblkbitronic/soporte/ was not found on this server.


This path EXISTS so I don't understand why it's not working.

Please I need an urgent solution for this.



Offline tidaltides

  • Spacescooter Operator
  • *****
  • Posts: 33
Re: Subdomain not working
« Reply #1 on: September 21, 2012, 06:56:44 PM »
Were you able to fix this problem? What did you do exactly?

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6190
Re: Subdomain not working
« Reply #2 on: September 22, 2012, 05:32:25 AM »
The /.htaccess code is sending anything not beginning with /web/... to /web/... The subdomain is showing up as either domain.com/suporte/ or suporte.domain.com/. Since it appears to be the first case, it's being sent to /web/suporte/. Try excluding suporte/ too:
Code: [Select]
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} domain.com$
RewriteCond %{REQUEST_URI} !web/
RewriteCond %{REQUEST_URI} !suporte/
RewriteRule ^(.*)$ web/$1
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

 

Share |