Skip to content

Conversation

@Bill-Thorsteinson
Copy link

Fix paths for apache2 mod_rewrite - add missing / at start of paths

Fix paths for apache2 mod_rewrite - add missing / at start of paths
@MorrisJobke
Copy link
Member

Works here without the leading /.

@rakekniven
Copy link
Member

Same here. Closing it?

@donfranio
Copy link

donfranio commented Nov 24, 2020

Did not work here, I also even created a PR with the same content, see above.
Sorry for that, did not find this Issue.

Jakuje added a commit to Jakuje/documentation that referenced this pull request Jun 15, 2023
The `.htaccess` rules should not have the starting slash otherwise they
will never get matched. When running the mod_rewrite in .htaccess, the
path is already sanitized and leading slashes stripped.

Document also that this is not the case when the rules are used directly
from the main apache2 configuration the leading slash is present always,
which led to some edit wars of this documentation in the past as it was
not well explained (nextcloud#8093, nextcloud#3811).

This matches the code shipped with the .htaccess in the nextcloud server:
https://github.com/nextcloud/server/blob/master/.htaccess

Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Jakuje added a commit to Jakuje/documentation that referenced this pull request Jun 15, 2023
The `.htaccess` rules should not have the starting slash otherwise they
will never get matched. When running the mod_rewrite in .htaccess, the
path is already sanitized and leading slashes stripped.

Document also that this is not the case when the rules are used directly
from the main apache2 configuration the leading slash is present always,
which led to some edit wars of this documentation in the past as it was
not well explained (nextcloud#8093, nextcloud#3811).

This matches the code shipped with the .htaccess in the nextcloud server:
https://github.com/nextcloud/server/blob/master/.htaccess

Signed-off-by: Jakub Jelen <jakuje@gmail.com>
backportbot-nextcloud bot pushed a commit that referenced this pull request Jun 15, 2023
The `.htaccess` rules should not have the starting slash otherwise they
will never get matched. When running the mod_rewrite in .htaccess, the
path is already sanitized and leading slashes stripped.

Document also that this is not the case when the rules are used directly
from the main apache2 configuration the leading slash is present always,
which led to some edit wars of this documentation in the past as it was
not well explained (#8093, #3811).

This matches the code shipped with the .htaccess in the nextcloud server:
https://github.com/nextcloud/server/blob/master/.htaccess

Signed-off-by: Jakub Jelen <jakuje@gmail.com>
backportbot-nextcloud bot pushed a commit that referenced this pull request Jun 15, 2023
The `.htaccess` rules should not have the starting slash otherwise they
will never get matched. When running the mod_rewrite in .htaccess, the
path is already sanitized and leading slashes stripped.

Document also that this is not the case when the rules are used directly
from the main apache2 configuration the leading slash is present always,
which led to some edit wars of this documentation in the past as it was
not well explained (#8093, #3811).

This matches the code shipped with the .htaccess in the nextcloud server:
https://github.com/nextcloud/server/blob/master/.htaccess

Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants