homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
redirect vs rewrite
when you use one and when the other
ergophobe




msg:1495509
 5:20 pm on May 7, 2002 (gmt 0)

I have a basic question: when is it more appropriate to use Rewrite and when Redirect. I use Rewrite, for example, to send everything to a single script, allowing me to use friendly URLs. I only do this because I don't know any other way, but could I do this with Redirect? Would there be any circumstance in which I would want to or should it literally be reserved for things that have moved?

Tom

 

jdMorgan




msg:1495510
 7:04 pm on May 7, 2002 (gmt 0)

Rewrite is much more powerful - and complex. So, I use Redirect (under mod_alias) for simple stuff, and Rewrite (under mod_rewrite) for more complicated applications. YMMV. There is a lot of overlap between these two modules' capabilities, so sometimes it's just a matter of personal preference or style.

ergophobe




msg:1495511
 9:49 pm on May 7, 2002 (gmt 0)

Thanks. I guess I should learn a bit more about Redirect.... it took me long enough to get a handle on Rewrite, but from the sounds of it, Redirect should be a bit easier.

Tom

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved