Ticket #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
comment:2 Changed 4 years ago by hkroger
What about just updating .htaccess with relevant redirects?
comment:3 Changed 4 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
- 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:4 Changed 4 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 4 years ago by tobixen
- Status changed from new to closed
- Resolution set to fixed
Fixed in r3285 - sorry the delay
comment:6 Changed 4 years ago by philipp
- Status changed from closed to reopened
- Resolution fixed deleted
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 4 years ago by philipp
- Milestone changed from 0.1-outreach-release to 0.1.1-outreach-bugfixing
comment:8 Changed 4 years ago by philipp
- follow_up set to none
- Status changed from reopened to new
- Component changed from BW General to ServerSetup
- Priority changed from blocker to major
- Milestone changed from 0.1.1-outreach-bugfixing to unassigned
- Owner set to tobixen
woring on production, please introduce to test
comment:9 Changed 4 years ago by micha
- Milestone changed from unassigned to 0.1.2 - more improvements & bugfixing
comment:11 Changed 4 years ago by midsch
- follow_up changed from test to none
- Status changed from new to closed
- Resolution set to fixed
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.



related: https://bewelcome.org/trac/ticket/151