Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Is mod_rewrite Serverside or does it simply redirect?
Old 10-05-2007, 03:20 AM Post Is mod_rewrite Serverside or does it simply redirect?
mwsource's Avatar
Skilled Talker

Posts: 61
Name: Reid
Location: Georgia, USA
Trades: 0
Hey guys,

Was wondering this:
If I wanted to use mod_rewrite (in .htaccess) to redirect a page to another page (or file), does:
  • Apache tell the browser to go to that new location? - OR -
  • Apache serve the page as scripted in .htaccess?

Ok, that's a little tricky. Real world example:
A webmaster of a file hosting site wants to generate a key for each individual download. So he temporarily creates a 'key' that expires after so much time (This is handled by PHP) that looks like this and is visible to the visitor:
Quote:
somedomain.com/downloadfile/[xxkeyxx]/
However the file to be downloaded is located here:
Quote:
somedomain.com/files/somedoc.pdf
If I were to tell .htaccess if the first url is to be 'rewritten' to the second url, does that mean that the second url is sent to the visitor's browser or does it not?

Thanks guys-
__________________
Reid Workman -
Please login or register to view this content. Registration is FREE
- Currently Working on a Freelance Job search: PM me if you are interesting in testing it.
mwsource is offline
Reply With Quote
View Public Profile Visit mwsource's homepage!
 
 
Register now for full access!
Old 10-05-2007, 03:38 AM Re: Is mod_rewrite Serverside or does it simply redirect?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Answer's 2: Apache interprets the path, and serve content upon the translated path.
The browser is not redirected.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Is mod_rewrite Serverside or does it simply redirect?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35386 seconds with 12 queries