Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Find redirect solution for the Security Guide #42

Closed
marble opened this issue Nov 15, 2018 · 5 comments
Closed

Find redirect solution for the Security Guide #42

marble opened this issue Nov 15, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@marble
Copy link
Member

marble commented Nov 15, 2018

#37 (comment)
Related: #37

@marble marble self-assigned this Nov 15, 2018
@marble
Copy link
Member Author

marble commented Nov 15, 2018


Current, suboptimal contents of ~/public_html/typo3cms/SecurityGuide/.htaccess:

`Options +Indexes
# Fix broken search in the singlehtml versions
# If searching, bring the user away from the singlehtml
# (where the search would only give an error 404) and direct him to the default version.
# See https://forge.typo3.org/issues/60838
RedirectMatch permanent (.*)/singlehtml/search\.html $1/search.html
RewriteEngine On
RewriteRule (GeneralInformation|TypesOfThreats|HackedSite|Backups|Introduction|SecurityTeam|GeneralGuidelines|GuidelinesAdministrators|GuidelinesIntegrators|GuidelinesEditors)(.*) https://docs.typo3.org/typo3cms/CoreApiReference/Security/$1/  [R=301,L]
RewriteRule singlehtml(.*) https://docs.typo3.org/typo3cms/CoreApiReference/singlehtml/ [R=301,L]
RewriteRule (stable/)?(.*) https://docs.typo3.org/typo3cms/CoreApiReference/$1Security/$2 [R=301,L]

# Do not rewrite URLs starting with any valid version number followed by a slash
RewriteRule ^(([0-9]+)(\.[0-9]+)(\.[0-9]+)*)/(.*)$ -  [L]
# Do not rewrite URLs starting with the provided words
RewriteRule ^(latest|packages|stable)(.*)$ -  [L]
RewriteRule ^manuals.json(.*)$ -  [L]
# Rewrite the rest into the folder stable/
RewriteRule ^(.*)$ stable/$1


I have disabled that .htaccess: mv .htaccess .htaccess.timek.htaccess

I have enabled the current default .htaccess which should be used in all base folders of a manual:
ln -s ~/scripts/config/_htaccess-2016-08.txt .htaccess

This is the contents of the standard .htaccess of 2016-08:

Options +Indexes

RewriteEngine On

# Do not rewrite URLs starting with any valid version number followed by a slash
RewriteRule ^[0-9]+(\.[0-9]+)(\.[0-9]+)*(-dev)?/(.*)$ -  [L]

# Do not rewrite URLs like '8-dev/'
RewriteRule ^[0-9]+-dev/(.*)$ -  [L]

# Do not rewrite URLs starting with the provided words
RewriteRule ^(latest|master|packages|stable)(.*)$ -  [L]

# still needed?
RewriteRule ^manuals.json(.*)$ -  [L]

# Rewrite other cases into the folder stable/
RewriteRule ^(.*)$ stable/$1

@marble
Copy link
Member Author

marble commented Nov 15, 2018

This ticket is waiting for somebody willing to invest time. Otherwise I'll close it some time soon.

@marble marble added the waiting for feedback Waiting for feedback and response by others label Nov 15, 2018
@sypets
Copy link
Contributor

sypets commented Nov 23, 2018

Please don't close.

@sypets sypets self-assigned this Nov 23, 2018
@sypets
Copy link
Contributor

sypets commented Nov 23, 2018

I do think the above rule should have worked:
RewriteRule (GeneralInformation|TypesOfThreats|HackedSite|Backups|Introduction|SecurityTeam|GeneralGuidelines|GuidelinesAdministrators|GuidelinesIntegrators|GuidelinesEditors)(.*) https://docs.typo3.org/typo3cms/CoreApiReference/Security/$1/ [R=301,L]
(#42 (comment))

@sypets sypets removed their assignment Nov 30, 2018
@DanielSiepmann DanielSiepmann added bug Something isn't working and removed waiting for feedback Waiting for feedback and response by others labels Mar 1, 2019
@DanielSiepmann
Copy link
Member

DanielSiepmann commented Mar 1, 2019

Let's proceed within #37

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants