Jump to content

Recommended Posts

I want to ask you some thing, I hope you can help me,  I have uploaded my website as activebiz.in, you may have a look..

Suppose I have 3 website on my web-space,

 

1] activebiz.in

2] abc123.in

3] abc2345.in

 

Please understand that activebiz, abc123 and abc2345 are 3 folders that have been placed in www folder in webspace.

 

how to place the website files of all the 3 websites so that when I access [1], it must access files belonging to activebiz folder in www folder only. I just type activebiz.in in URL and it gets redirected automatically to /www/activebiz/index.php.......

 

if I want to access abc123.in, it must access files belonging to abc123 folder in www folder only. I just type abc123.in in URL and it gets redirected automatically to /www/abc123/index.php.......

 

 

if I want to access abc2345.in, it must access files belonging to abc2345 folder in www folder only. I just type abc2345.in in URL and it gets redirected automatically to /www/abc2345/index.php.......

 

Please tell the solution soon............

 

Warm Regards
Link to comment
https://forums.phpfreaks.com/topic/279517-how-to-access-website-on-web-space/
Share on other sites

Create a .htaccess file containing:

RewriteEngine On

RewriteCond %{HTTP_HOST} ([^\.])\.in$ [NC]
RewriteRule ^\/(.*)$ /www/%1/$1 [R=301,L]

Assuming that /www is actually in the root of the file system and not in /home/{username}/www like I imagine it actually is.

Thanks txmedic03 for telling the solution. Please elaborate more on this, 

 

 

what must be the complete name of ".htaccess" file ??
 
And the home directory for www folder is 
/home/[user name]/www/ ,please elaborate more on what you have explained in last post
 
I have created user.htaccess file and placed it in www folder, now what else ??
  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.