UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 6th February 2003, 03:13 PM   #1 (permalink)
lieut_data
Registered User
 
Join Date: Jan 2003
Location: Ontario, Canada
Posts: 45
Send a message via Yahoo to lieut_data
.htaccess Redirects


I am trying to forward all request to a subdomain of mine, to one of my "user"'s directories. i.e.

subdomain.domain.com -> domain.com/~user/

I have gotten
Redirect /subdomain.domain.com/index.htm http://www.domain.com/~user/

to work for URL's just entered as subdomain.domain.com, but I would like to utilize .htaccess's feature of redirecting all requests to a directory to another folder, supposedly accomplished via:

Redirect /subdomain.domain.com http://www.domain.com/~user/

Thus, a request to subdomain.domain.com/image1.png will be interpreted as www.domain.com/~user/image1.png

Unfortunately, I can't seem to get it to work (just spits out an error 404) Am I doing something wrong with the above code?

Thanks!
lieut_data is offline   Reply With Quote
Old 6th February 2003, 03:14 PM   #2 (permalink)
lieut_data
Registered User
 
Join Date: Jan 2003
Location: Ontario, Canada
Posts: 45
Send a message via Yahoo to lieut_data
Re:.htaccess Redirects

Would you believe how many tries it took to get this post working? Norton 2003: I just found that every time I tried to post it, it would create a security alert characteristic of a RAQ_HTaccess attack or something: LOL

All because it found the word in a post :-)
lieut_data is offline   Reply With Quote
Old 7th February 2003, 04:10 PM   #3 (permalink)
UH-Simon
Administrator
 
UH-Simon's Avatar
 
Join Date: Oct 2002
Location: Hertfordshire, UK
Posts: 4,601
Re:.htaccess Redirects

Drop me an email simon@unitedhosting.co.uk and I'll take a look at the htaccess file. To be honest I've never really liked doing forward using htaccess, it's much easier to use framed forwarding with a meta refresh.
__________________
.
Simon
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Simon is offline   Reply With Quote
Old 7th February 2003, 05:57 PM   #4 (permalink)
UH-Simon
Administrator
 
UH-Simon's Avatar
 
Join Date: Oct 2002
Location: Hertfordshire, UK
Posts: 4,601
Re:.htaccess Redirects

The basic .htaccess contents for a simple redirect would be something like below:

Options +FollowSymlinks
Redirect / http://www.yourdomain.com/thefiletoload.html

This would also work for files. Say for example I wanted subdomain.yourdomain.com/image1.jpg to redirect to http://yourotherdomain.com/image2.jpg then the .htaccess would be as follows:

Options +FollowSymlinks
Redirect /image1.jpg http://www.yourdomain.com/image2.jpg

Their is no need to specify a path to where the .htaccess file is located.
__________________
.
Simon
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Simon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 09:13 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309