- Code: Select all
GET http://www.mountain-software.com/demos/versions.txt
I would like to replace this with a new file, and redirect requests for the above file to the new one at:
- Code: Select all
www.mountain-software.com/version_info.ini
I tried doing this with a Rewrite command in my htaccess file:
- Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mountain-software\.com [nc]
RewriteRule (.*) http://www.mountain-software.com/$1 [R=301,L]
Redirect 301 /demos/versions.txt http://www.mountain-software.com/version_info.ini
Unfortunately, instead of receiving the contents of the version_info.ini file, my programs receive this:
- Code: Select all
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.mountain-software.com/version_info.ini">here</a>.</p>
</body></html>
Eventually, I will update my programs to reference the new file, but I don't want to leave both old and new files in place to prevent breaking old versions of my programs.
Is there a way to make this work properly (get the version_info.ini file anytime the versions.txt file is requested)?
Thanks,
Anthony