dodle
December 11th, 2011, 07:58 AM
Is it possible to redirect apt-get to a new repository from an old one. Say, I had a repo at http://myoldrepo.com/apt and now I have one at http://mynewrepo.com/apt. Is there a way to get all calls to myoldrepo.com redirected to mynewrepo.com?
----- EDIT -----
I tried making http://myoldrepo.com/apt into an HTML file and putting a 302 redirect in it, but apt-get doesn't follow it.
<html>
<head>
<script type="text/javascript">
<!--
window.location.href='http://mynewrepo.com/apt';
-->
</script>
</head>
<body>
This repository has moved to http://mynewrepo.com/apt
</body>
</html>
I also tried putting the new repo location in the Filename field of the Packages file:
Filename: http://mynewrepo.com/apt/pool/main/m/myfile/myfile.deb
But then it looked for the file in http://myoldrepo/apthttp://mynewrepo.com/apt/pool/main/m/myfile/myfile.deb.
----- EDIT -----
Was my question clear? I want to move my repository to a new location but leave the old URL usable for people who don't know about the move.
----- EDIT -----
I tried making http://myoldrepo.com/apt into an HTML file and putting a 302 redirect in it, but apt-get doesn't follow it.
<html>
<head>
<script type="text/javascript">
<!--
window.location.href='http://mynewrepo.com/apt';
-->
</script>
</head>
<body>
This repository has moved to http://mynewrepo.com/apt
</body>
</html>
I also tried putting the new repo location in the Filename field of the Packages file:
Filename: http://mynewrepo.com/apt/pool/main/m/myfile/myfile.deb
But then it looked for the file in http://myoldrepo/apthttp://mynewrepo.com/apt/pool/main/m/myfile/myfile.deb.
----- EDIT -----
Was my question clear? I want to move my repository to a new location but leave the old URL usable for people who don't know about the move.