Mod_rewrite shortening url .htaccess

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2010-06-03T14:58:20Z Indexed on 2010/06/03 15:24 UTC
Read the original article Hit count: 342

Filed under:
|

is there any way to hide redirected url, here is what I think:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://%{HTTP_HOST}%{REQUEST_URI}&force

So the long redirected url http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://%{HTTP_HOST}%{REQUEST_URI} to something shorter like /mintedomain.com/track/

It is possible?

Adrian

edit:

Andrew:

This is a stats software Mint (haveamint.com) with File Download tracker plugin. The File Download tracker works in this way:

in .htaccess every file (zip, rar, txt,...) is redirected to the tracker.php file (because the stats): http://mydomain.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://%{HTTP_HOST}%{REQUEST_URI}

So the redirected url look like this for a zip file: http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://mydomain/downloads/apple.zip

This redirected URL is very long and ugly. The best for me would be to redirect this redirected URL to something shorter URL: example: http://mydomain.com/track/downloads/apple.zip..

So the http://mydomain.com/track would be the http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-rewrite