Topics

Redirect file for sourceforge.net?

Bob Jacobsen
 

Does anybody have a copy of the redirect file that we put on the sourceforge.net web server to permanently redirect _everything_ to jmri.org? Or know how to make one?

There was one, but SF.net deleted it while restoring an old copy of the web site during one fo their (increasingly frequent) crashes. We currently use Jenkins to (try to) keep jmri.sf.net up to date, but that failed a couple days ago and I just figured it out today: SF.net apparently restored the content of a file without changing its dates, so the rsync didn’t fix it.

I’d really like to put it back, as SF.net is becoming increasingly erratic.

Bob

--
Bob Jacobsen
@BobJacobsen

db123@bergqvist.se
 

Maybe the attached file may help you. It's name must be .htaccess if the site is running Apache and to be placed in the root folder of the domain. It's the .htaccess file for the site www.modulsyd.se.

Daniel

2019-01-06 19:15 skrev Bob Jacobsen:

Does anybody have a copy of the redirect file that we put on the
sourceforge.net web server to permanently redirect _everything_ to
jmri.org? Or know how to make one?
There was one, but SF.net deleted it while restoring an old copy of
the web site during one fo their (increasingly frequent) crashes. We
currently use Jenkins to (try to) keep jmri.sf.net up to date, but
that failed a couple days ago and I just figured it out today: SF.net
apparently restored the content of a file without changing its dates,
so the rsync didn’t fix it.
I’d really like to put it back, as SF.net is becoming increasingly erratic.
Bob
--
Bob Jacobsen
@BobJacobsen

Matthew Harris
 

Bob,

I'll have a dig around to see if I've still got a copy of the original one.

Best regards,

Matt H 

On Sun, 6 Jan 2019, 19:15 Bob Jacobsen, <rgj1927@...> wrote:
Does anybody have a copy of the redirect file that we put on the sourceforge.net web server to permanently redirect _everything_ to jmri.org?  Or know how to make one?

There was one, but SF.net deleted it while restoring an  old copy of the web site during one fo their (increasingly frequent) crashes.  We currently use Jenkins to (try to) keep jmri.sf.net up to date, but that failed a couple days ago and I just figured it out today: SF.net apparently restored the content of a file without changing its dates, so the rsync didn’t fix it.

I’d really like to put it back, as SF.net is becoming increasingly erratic.

Bob

--
Bob Jacobsen
rgj1927@...






Bob Jacobsen
 

Thanks to both of you!

I just cobbled together something:

# Jan 2019 redirect all to jmri.org
RewriteEngine on
# the next line is to get http://jmri.sf.net (no trailing slash) to go to jmri.org
Redirect 301 index.html http://jmri.org/index.shtml
Redirect 301 / http://jmri.org/

which seems to _almost_ work. a reference to

jmri.sf.net

(i.e. with nothing else) ends up with some extra slashes. And a reference

http://jmri.sf.net/index.html

ends up at

http://jmri.org/index.html

which doesn’t exist.

Still, this is progress. Any ideas on improvements greatly appreciated.

Bob


On Jan 6, 2019, at 11:00 AM, Matthew Harris <@mattharris> wrote:

Bob,

I'll have a dig around to see if I've still got a copy of the original one.

Best regards,

Matt H

On Sun, 6 Jan 2019, 19:15 Bob Jacobsen, <@BobJacobsen> wrote:
Does anybody have a copy of the redirect file that we put on the sourceforge.net web server to permanently redirect _everything_ to jmri.org? Or know how to make one?

There was one, but SF.net deleted it while restoring an old copy of the web site during one fo their (increasingly frequent) crashes. We currently use Jenkins to (try to) keep jmri.sf.net up to date, but that failed a couple days ago and I just figured it out today: SF.net apparently restored the content of a file without changing its dates, so the rsync didn’t fix it.

I’d really like to put it back, as SF.net is becoming increasingly erratic.

Bob

--
Bob Jacobsen
@BobJacobsen






--
Bob Jacobsen
@BobJacobsen

db123@bergqvist.se
 

Try to change:
Redirect 301 index.html http://jmri.org/index.shtml
to:
Redirect 301 "^$" http://jmri.org/index.shtml

and see if that works better.

I think that ^ is the beginning of the line and that $ is the end of the line.

https://httpd.apache.org/docs/2.4/rewrite/remapping.html

Daniel

2019-01-06 20:25 skrev Bob Jacobsen:

Thanks to both of you!
I just cobbled together something:
# Jan 2019 redirect all to jmri.org
RewriteEngine on
# the next line is to get http://jmri.sf.net (no trailing slash) to go
to jmri.org
Redirect 301 index.html http://jmri.org/index.shtml
Redirect 301 / http://jmri.org/
which seems to _almost_ work. a reference to
jmri.sf.net
(i.e. with nothing else) ends up with some extra slashes. And a reference
http://jmri.sf.net/index.html
ends up at
http://jmri.org/index.html
which doesn’t exist.
Still, this is progress. Any ideas on improvements greatly appreciated.
Bob

On Jan 6, 2019, at 11:00 AM, Matthew Harris <@mattharris> wrote:
Bob,
I'll have a dig around to see if I've still got a copy of the original one.
Best regards,
Matt H
On Sun, 6 Jan 2019, 19:15 Bob Jacobsen, <@BobJacobsen> wrote:
Does anybody have a copy of the redirect file that we put on the sourceforge.net web server to permanently redirect _everything_ to jmri.org? Or know how to make one?
There was one, but SF.net deleted it while restoring an old copy of the web site during one fo their (increasingly frequent) crashes. We currently use Jenkins to (try to) keep jmri.sf.net up to date, but that failed a couple days ago and I just figured it out today: SF.net apparently restored the content of a file without changing its dates, so the rsync didn’t fix it.
I’d really like to put it back, as SF.net is becoming increasingly erratic.
Bob
--
Bob Jacobsen
@BobJacobsen
--
Bob Jacobsen
@BobJacobsen

Peter Ulvestad
 

I just clicked on http://jmri.sourceforge.net/ and it is now redirecting to jmri.org.

Peter

Matthew Harris
 

Bob,

I've found back the old file (was on an old laptop).

Anyhow, contents are:

----

AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !jmri.sourceforge.net$ [NC]
RewriteRule ^(.*)$ http://jmri.org/$1 [L,R=302]

----

Although you could probably change the 302 to a 301 as we want a permanent redirect, not a temporary one so as to help transfer domain authority toward the jmri.org domain.


Best regards,

Matt H

On Sun, 6 Jan 2019 at 22:10, Peter Ulvestad <ulvestad@...> wrote:
I just clicked on http://jmri.sourceforge.net/ and it is now redirecting to jmri.org.

Peter