Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 25th, 2001, 10:43 AM
dcreelma dcreelma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 4 dcreelma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face

I added a redirect in an .htaccess file that works fine. However I want to redirect all file accesses to the specific directory to a "directory" location on another server not including the filename.

For instance, I set up a redirect as follows

Redirect /joe http://www.yahoo.com

This redirects all files that are called from /joe to yahoo but it appends the filename. So if someone tries to access /joe/smith.html they will be redirected to http://www.yahoo.com/smith.html

I'm sure I'm missing something basic but can someone explain how to always redirect to http://www.yahoo.com no matter what is accessed in the original directory?

Thanks
David

Reply With Quote
  #2  
Old April 26th, 2001, 06:52 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> So if someone tries to access /joe/smith.html they will be redirected to http://www.yahoo.com/smith.html

So do you want to include the filename or not?

If mod_rewrite was compiled in, try the following code:

RewriteEngine on
RewriteBase /joe
RewriteRule ^(.*)$ http://www.yahoo.com/$1 [R,L]

http://www.yourdomain.com/joe/ to http://www.yahoo.com/
http://www.yourdomain.com/joe/smith.html to http://www.yahoo.com/smith.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Newbie .htaccess redirect question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway