jekyll / jekyll-redirect-from

:twisted_rightwards_arrows: Seamlessly specify multiple redirections URLs for your pages and posts.
MIT License
781 stars 112 forks source link

PHP redirects_from gets downloaded instead of redirected #145

Closed p4m closed 7 years ago

p4m commented 7 years ago

I use redirect_from to redirect old .php extensions

redirect_from:
  - /aanmelden.php
  - /repetities.php
  - /links.php

Instead of redirecting to the correct page, the generated php-page (with the redirect code inside) get's downloaded on the client.

Is this something due to a wrong configuration on my side? I'm hosting the website on github pages.

Hope to here from you...

jekyllbot commented 7 years ago

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

pathawks commented 7 years ago

It sounds like your server is not configured to serve .php files as text/html

There isn't anything this plugin can do to solve this, the server configuration must be changed.

ousia commented 6 years ago

@benbalter,

according to @pathawks, .php should be served as text/html to make jekyll-redirect-from work with Jekyll.

@p4m and myself report that GitHub Pages serves .php files as downloads instead of redirections.

Would it be possible that GitHub Pages could serve .php files as text/html, so that redirections from them worked fine?

Many thanks for your help.

ousia commented 6 years ago

@benbalter, sorry for the noise, I have already solved the issue, as described in #92.

@p4m, append .html to your redirects, such as in:

redirect_from:
  - /aanmelden.php.html
  - /repetities.php.html
  - /links.php.html

Please, close the issue, if the fix from #92 works for you.

ousia commented 6 years ago

@p4m, my apologies, the issue had already been closed.