HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   How to shorten the web site address? (http://www.howtoforge.com/forums/showthread.php?t=1496)

rosa hsiao 1st December 2005 10:26

How to shorten the web site address?
 
Is there any way to shorten the web site address in the browser?


1) visit user's web site by typing

"http://www.example.com/user01/"
instead of
"http://www.example.com/~webid_user01/"

2) login to user's webmail by typing

"http://www.example.com/user01/webmail"
instead of
"http://www.example.com:81/webmail/index.php?lid=2&tid=0&f_user=&six=&f_email=user01@ example.com"

falko 1st December 2005 10:48

Quote:

Originally Posted by rosa hsiao
1) visit user's web site by typing

"http://www.example.com/user01/"
instead of
"http://www.example.com/~webid_user01/"

You can create a folder user01 manually and then redirect from it to http://www.example.com/~webid_user01/.

Quote:

Originally Posted by rosa hsiao
2) login to user's webmail by typing

"http://www.example.com/user01/webmail"
instead of
"http://www.example.com:81/webmail/index.php?lid=2&tid=0&f_user=&six=&f_email=user01@ example.com"

The same here.

rosa hsiao 1st December 2005 11:45

Quote:

Originally Posted by falko
You can create a folder user01 manually and then redirect from it to http://www.example.com/~webid_user01/.
The same here.

Do you mean to create a folder user01 manually under /home/www/webid/user/ and copy all the web pages from /home/www/webid/user/webid_user01/web to /home/www/webid/user01/web or just create a symbolic link to it?


I can write a php to redirect "http://www.example.com/~webid_user01/webmail"
to
"http://www.example.com:81/webmail/index.php?lid=2&tid=0&f_user=&six=&f_email=user01@ example.com".

But I don't want the browser to see where the redirected web address is.
How can I prevent the browser from seeing the whole redirected web string as http://www.example.com:81/webmail/in...1@example.com?


Can you show me steps as how to achieve those goals without fail?

falko 1st December 2005 14:04

Quote:

Originally Posted by rosa hsiao
Do you mean to create a folder user01 manually under /home/www/webid/user/ and copy all the web pages from /home/www/webid/user/webid_user01/web to /home/www/webid/user01/web or just create a symbolic link to it?

No, you create the folder user01 manually under /home/www/webid/web (/home/www/webid/web/user01) and then create a redirect (e.g. with PHP) in that folder to /home/www/webid/user01/web.



Quote:

Originally Posted by rosa hsiao
But I don't want the browser to see where the redirected web address is.
How can I prevent the browser from seeing the whole redirected web string as http://www.example.com:81/webmail/in...1@example.com?


Can you show me steps as how to achieve those goals without fail?

It might be possible to achieve it with Apache rewrite rules: http://httpd.apache.org/docs/1.3/misc/rewriteguide.html

rosa hsiao 2nd December 2005 02:51

Quote:

Originally Posted by falko
No, you create the folder user01 manually under /home/www/webid/web (/home/www/webid/web/user01) and then create a redirect (e.g. with PHP) in that folder to /home/www/webid/user01/web.

Thanks a lot. I will give it a try.

rosa hsiao 5th December 2005 14:29

Quote:

Originally Posted by falko
No, you create the folder user01 manually under /home/www/webid/web (/home/www/webid/web/user01) and then create a redirect (e.g. with PHP) in that folder to /home/www/webid/user01/web.

I did as you suggested and by using smbolic link,the alias problem was solved. Thanks!


All times are GMT +2. The time now is 18:23.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.