Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
September 02, 2014, 11:08:11 PM

Pages: [1]   Go Down
  Print  
Author Topic: Subdomain not working  (Read 20276 times)
jawks
Newbie
*
Offline Offline

Posts: 2


« 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.


Logged
tidaltides
Spacescooter Operator
*****
Offline Offline

Posts: 33


« Reply #1 on: September 21, 2012, 06:56:44 PM »

Were you able to fix this problem? What did you do exactly?
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5871



« 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:
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} domain.com$
RewriteCond %{REQUEST_URI} !web/
RewriteCond %{REQUEST_URI} !suporte/
RewriteRule ^(.*)$ web/$1
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
Pages: [1]   Go Up
  Print  
 
Jump to: