how to mask domain like that ?

Using a single web hosting account to host multiple sites

how to mask domain like that ?

Postby jame_2d@yahoo.com » Sun Apr 22, 2007 11:58 pm

Dear all friend

i am web master http://www.atkhmer.com
i want to when user type www.atkhmer.com/jame_2d
it call profile of www.atkhmer.com/profile.php?un=jame_2d

but not redirect it just call that page to place in


please help me !

thank before hand
http://www.atkhmer.com
jame_2d@yahoo.com
 
Posts: 12
Joined: Tue Aug 22, 2006 4:26 am

Postby richardk » Mon Apr 23, 2007 9:58 am

In a .htaccess file in your document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /profile.php?un=$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby jame_2d@yahoo.com » Mon Apr 23, 2007 6:48 pm

richardk wrote:In a .htaccess file in your document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /profile.php?un=$1 [QSA,L]



dear friend

it call profile.php or redirect to profile.php

i mean that it call only not redirect to header to other file
jame_2d@yahoo.com
 
Posts: 12
Joined: Tue Aug 22, 2006 4:26 am

Postby jame_2d@yahoo.com » Mon Apr 23, 2007 7:00 pm

jame_2d@yahoo.com wrote:
richardk wrote:In a .htaccess file in your document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /profile.php?un=$1 [QSA,L]



i have test this page is good but
if i want like that http://www.atkhmer.com/jame
and the call http://www.atkhmer.com/hi_my_friend/profile.php?u=jame

i can but error with path of image ...so how to do it better with no problem with image path ...
jame_2d@yahoo.com
 
Posts: 12
Joined: Tue Aug 22, 2006 4:26 am

Postby richardk » Tue Apr 24, 2007 8:31 am

i can but error with path of image ...so how to do it better with no problem with image path ...

Are you using relative paths? Read this.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 95 guests

cron