php - How to redirect links with htaccess? -


for example have website example.com has link file stored in example.org. if user clicks download (default link www.example.org/file.zip) want redirect him third domain - example.net. in short: www.example.com has link www.example.org when click redirected example.net. possible using htaccess?

to answer question: yes, possible. being vague, want make sure customize below solution meet real requirements. essential like:

<ifmodule mod_rewrite.c> rewriteengine on rewritecond %{request_filename} !-f rewriterule ^(.+)\.zip$ http://example.com/{request_uri} [l,qsa] </ifmodule> 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -