Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid redirects for directories #102

Closed
vividsnow opened this issue Sep 29, 2021 · 3 comments
Closed

avoid redirects for directories #102

vividsnow opened this issue Sep 29, 2021 · 3 comments

Comments

@vividsnow
Copy link

hello

if's possible to avoid 301 responses by adding

<xsl:if test="name()='directory'"><xsl:text>/</xsl:text></xsl:if>

to urls

@gibatronic
Copy link
Owner

gibatronic commented Oct 4, 2021

hi there!

I don't know what problem is being solved here, what redirects?
and how testing for the item tag name solves that?

@vividsnow
Copy link
Author

without trailing slash nginx will issue http redirect 301 (eg. http://host/dir -> http://host/dir/)

@gibatronic
Copy link
Owner

gibatronic commented Oct 16, 2021

ah indeed, thank you for the solution and for reporting it!

gibatronic added a commit that referenced this issue Oct 16, 2021
leojonathanoh added a commit to leojonathanoh/Nginx-Autoindex that referenced this issue Nov 13, 2021
Directory `href`s do not contain a trailing `/` leading to `301` redirects everytime a directory is clicked. Related: gibatronic/ngx-superbindex#102

This MR fixes that issue.
leojonathanoh added a commit to leojonathanoh/Nginx-Autoindex that referenced this issue Nov 13, 2021
Directory `href`s do not contain a trailing `/` leading to `301` redirects everytime a directory is clicked. Related: gibatronic/ngx-superbindex#102

This MR fixes that issue.
leojonathanoh added a commit to leojonathanoh/Nginx-Autoindex that referenced this issue Nov 13, 2021
Directory `href`s do not contain a trailing `/` leading to `301` redirects everytime a directory is clicked. Related: gibatronic/ngx-superbindex#102

This MR fixes that issue.
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

No branches or pull requests

2 participants