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

when url is missing backslash, correct redirect is not generated #10

Closed
jglovier opened this issue Jan 20, 2014 · 9 comments
Closed

when url is missing backslash, correct redirect is not generated #10

jglovier opened this issue Jan 20, 2014 · 9 comments

Comments

@jglovier
Copy link
Member

I noticed that when specifying the URL to redirect from, the trailing backslash must be included or else jekyll-redirect-from fails to produce the correct redirect.

For example...

redirect_from: /some-url-to-redirect-from/

...works as expected, producing the correct subdirectory with an index.html. However...

redirect_from: /some-url-to-redirect-from

Does not produce /some-url-to-redirect-from/index.html but instead productes /some-url-to-redirect-from where it is a file with that name, instead of a directory with an index file.

Personally, I'm okay with that behavior, but think it should at least be specified in the README. However, if it's not too much work, or if you don't think it's problematic from an architecture standpoint, I'd say it might be nice to make both work as expected (i.e. any url created without a file extension should convert to a corresponding directory path with an index.html inside).

@mattr-
Copy link
Member

mattr- commented Jan 20, 2014

👍 to making it handle both. 😃

@parkr
Copy link
Member

parkr commented Jan 22, 2014

I updated the README but it only shows one use-case. Mind writing what you think should be there and submitting a PR?

@jglovier
Copy link
Member Author

Mind writing what you think should be there and submitting a PR?

Sure. So you just want me to submit edits for the current behavior then? Or have you also updated the plugin to work for both use-cases, so I should account for both in my edits?

@jglovier
Copy link
Member Author

K, I just submitted a PR with my edits. If I misunderstood - apologies - just let me know.

@taigeair
Copy link

Is it possible to make redirects without the trailing slash work? It seems like you don't need it in the example. But when I go to a redirect url, it doesn't redirect but instead gives a file to download.

@parkr
Copy link
Member

parkr commented Jun 26, 2014

But when I go to a redirect url, it doesn't redirect but instead gives a file to download

@taigeair Sounds like a MIME types issue with the server you're using. Can you tell me a bit about the environment serving your Jekyll site?

@parkr parkr closed this as completed Jun 26, 2014
@taigeair
Copy link

I'm using github pages. This is the the link I'm talking about http://www.taigeair.com/aboutz

@parkr
Copy link
Member

parkr commented Jun 27, 2014

Write support@github.com!

@taigeair
Copy link

okay thanks.

rvangeldrop pushed a commit to firmhouse/leanstartupnl-website that referenced this issue Aug 15, 2016
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants