Opened 10 years ago

Closed 9 years ago

#152 closed new feature (fixed)

general redirect for old BW links

Reported by: philipp Owned by: tobixen
Priority: major Milestone: 0.1.3
Component: ServerSetup Keywords: hot, easy,
Cc:

Description

the BW pages moved from bewelcome.org/xxx.php to bewelcome.org/bw/xxx.php

To keep compatible with the links in the translations (which could be changed) and on external sites (which can not be changed) we need to create a redirect function inside rox, that catches all dead end links to bewelcome.org/xxx.php and redirect them to bewelcome.org/bw/xxx.php.

As rox links don't contain .php it should be fairly easy to distinguish and handle in the rox controller.

Change History (11)

comment:2 Changed 10 years ago by hkroger

What about just updating .htaccess with relevant redirects?

comment:3 Changed 10 years ago by tobixen

I believe something like this should work ... but I have no time testing now.

This file needs to be symlinked to .htaccess ... unfortunately we have the password restrictions in the .htaccess file on the server, so we would need to do some sysadmin to get it to work anyway.

===================================================================
--- .htaccess.example (revision 3249)
+++ .htaccess.example (working copy)
@@ -3,4 +3,7 @@

RewriteBase? /
RewriteCond? %{REQUEST_FILENAME} !-f
RewriteCond? %{REQUEST_FILENAME} !-d

\ No newline at end of file
+ RewriteRule? /?([/]*).php /bw/$1.php
+ RewriteCond? %{REQUEST_FILENAME} !-f
+ RewriteCond? %{REQUEST_FILENAME} !-d
+ RewriteRule? .* index.php

comment:4 Changed 10 years ago by tobixen

Hm ... new attempt

$ svn diff .htaccess.example 
Index: .htaccess.example
===================================================================
--- .htaccess.example   (revision 3249)
+++ .htaccess.example   (working copy)
@@ -3,4 +3,7 @@
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
-  RewriteRule ^.* index.php
\ No newline at end of file
+  RewriteRule ^/?([^/]*).php /bw/$1.php
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteRule ^.* index.php

comment:5 Changed 10 years ago by tobixen

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3285 - sorry the delay

comment:6 Changed 10 years ago by philipp

  • Resolution fixed deleted
  • Status changed from closed to reopened

works fine on alpha
could you please introduce it for test as well

  • we have to keep in mind to introduce it to production while releasing

comment:7 Changed 10 years ago by philipp

  • Milestone changed from 0.1-outreach-release to 0.1.1-outreach-bugfixing

comment:8 Changed 10 years ago by philipp

  • Component changed from BW General to ServerSetup
  • follow_up set to none
  • Milestone changed from 0.1.1-outreach-bugfixing to unassigned
  • Owner set to tobixen
  • Priority changed from blocker to major
  • Status changed from reopened to new

woring on production, please introduce to test

comment:9 Changed 9 years ago by micha

  • Milestone changed from unassigned to 0.1.2 - more improvements & bugfixing

comment:10 Changed 9 years ago by tobixen

  • follow_up changed from none to test

I've set this up.

comment:11 Changed 9 years ago by midsch

  • follow_up changed from test to none
  • Resolution set to fixed
  • Status changed from new to closed

I've checked http://www.bewelcome.org/ when not logged in and all links validate at http://validator.w3.org/checklink?check=Check&hide_type=all&summary=on&uri=http%3A%2F%2Fwww.bewelcome.org%2F

When logged in everything is fine as well.

Only in the main text area the links are still in the old format, like http://www.bewelcome.org/member.php?cid=valerii but then the redirect works.

Note: See TracTickets for help on using tickets.