
9th August 2010, 16:54
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 189
Thanks: 38
Thanked 4 Times in 4 Posts
|
|
short url for SERVER
Dear All,
Can I access http://server1.example.com:8080 by creating an alias or URL redirect like admin.example.com etc.
I think it will be more convenient for the customers to login to the account by easy URL.
Regards
Pawan Joshi
|

9th August 2010, 16:57
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
Yes, you can do this e.g. with apache rewrite rules.
For examples see here:
http://httpd.apache.org/docs/current...d_rewrite.html
|

9th August 2010, 23:22
|
|
Member
|
|
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
|
|
Till, I've read through a load of documentation for the mod_rewrite module but can't figure out how to do it for a port such as :8080.
Also, must the module be set in httpd.conf?
|

9th August 2010, 23:29
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
The rules should work for ports as well. e.g.
Code:
RewriteCond %{HTTP_HOST} ^admin.example.com [NC]
RewriteRule ^/(.*) http://server1.example.com:8080/ [L,R]
Quote:
|
Also, must the module be set in httpd.conf?
|
No. It is lready enabled.
|

10th August 2010, 08:50
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 189
Thanks: 38
Thanked 4 Times in 4 Posts
|
|
short URL
Dear Till,
Thanks for the detailed explanation by example.
Though I have not tried it, I have another question that is say I have five domain created in ISPCONFIG.
I can access ISPCONFIG control panel login from anydomain.tld:8080 that is any five domains with :8080. is it ok.
|

10th August 2010, 13:28
|
|
Member
|
|
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
|
|
Must I write Tills example in the website options box?
|

10th August 2010, 15:14
|
|
Member
|
|
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
|
|
Okay Im really tearing my hair out with this one.
Im using the code:
RewriteEngine on
RewriteRule ^/admin$ %{HTTP_HOST}:8080/ [R]
which of course doesn't work because it takes me to the url
http://mydomain.com/mydomain.com:8080
How can i get rid of the first part so im left with domain.com:8080?
|

10th August 2010, 16:14
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
Quote:
|
How can i get rid of the first part so im left with domain.com:8080?
|
Please see my example above. You are currently redirecting to a path and I'am redirecting to URL in my example.
|

10th August 2010, 18:08
|
|
Member
|
|
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
|
|
Hmm still cant get it to work.
I tried
RewriteCond %{HTTP_HOST} ^domain.ath.cx/admin [NC]
RewriteRule ^/(.*) domain.ath.cx:8080/ [L,R]
could you please point out what im doing wrong?
I dont want a subdomain, just a directory to redirect.
|

10th August 2010, 18:11
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
You entered a path as redirect target but you have to use a URL. A URL starts with http://. So your rewrite rule has to be a URL like this:
RewriteRule ^/(.*) http://domain.ath.cx:8080/ [L,R]
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 07:44.
|
Recent comments
1 day 22 hours ago
2 days 7 hours ago
2 days 10 hours ago
2 days 11 hours ago
2 days 13 hours ago
2 days 14 hours ago
2 days 16 hours ago
2 days 17 hours ago
3 days 9 hours ago
3 days 10 hours ago