modxcms / Redirector

Handles all your site redirects in MODx Revolution.
https://docs.modx.com/current/en/extras/redirector/index
8 stars 21 forks source link

Feature request: 302 redirects #64

Open getandyjones opened 7 years ago

getandyjones commented 7 years ago

Hi There,

I love your plugin, but think it would be useful if I could add my 302 redirects there too - so a dropdown to select either 301 or 302 - that way, all my redirects can be in one place - what do you think?

Jako commented 7 years ago

This is hardcoded at the moment in https://github.com/modxcms/Redirector/blob/develop/core/components/redirector/elements/plugins/redirector.plugin.php#L74

Do you need to manage it for each redirect or as a global option for all redirects?

getandyjones commented 7 years ago

I have a mixture of 301 and 302 redirects to manage - so Ideally I wanted to be able to choose on an ad-hoc basis - and also be able to import with CSV: pattern,target,context,type(301 or 302) type of thing?

Also, I cannot import a csv of 301s for some reason - they all fail. I've tried with and without the csv headings, but can't get it to work?

Jako commented 7 years ago

Adding it for each redirect will be some work, since there has to be a database field, an input in the manager page etc.

I can't say much about the CSV import problem. Maybe a BOM in the CSV or an encoding problem.

getandyjones commented 7 years ago

OK thanks - will check the CSVs - but they look fine to me. How should they be formatted? ie - do we need a title for each column? pattern,target,context

hugopeek commented 5 years ago

One more vote for this enhancement, with the option to set this per redirect. My client is also requesting for 410 redirects btw (page removed).