Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2015-05-02 12:47:11

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,910
Website

Re: arc_redirect

candyman wrote #290368:

Can you explain me how did you obtained that?
I thought that the plugin was for 404 only.

I check in my logs for repeated patterns from people who try to hack my sites. A regular one is
http://site.tld/wp-content/plugins which I redirect to google.com

there are about 20 variations of different wp based urls and about 10 for fckeditor.

I know that I could be redirecting via htaccess but I prefer using the web interface offered by the plugin.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#12 2015-05-14 18:17:03

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 238
Website

Re: arc_redirect

colak wrote #290367:

Also do you happen to have an older secure version of the plugin which works on txp 4.4.x?

Sorry for the slow response. v1.01beta should work with older versions of Textpattern.

Offline

#13 2015-05-15 06:29:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,910
Website

Re: arc_redirect

thanks Andy, no worries re the slow response.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#14 2016-08-23 17:21:05

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

Re: arc_redirect

Hi Andy,

You have no examples in your instructions to guide me along, so forgive me if I have this wrong, but I need to redirect all URLs in a given section (/section) to root domain (homepage).

In smd_redirect, it’s a simple matter of using /section in the from field and nothing (empty) in the to field for a homepage routing.

That doesn’t seem to be the same process in your plugin as the redirect won’t save when a field is empty.

I then tried using an absolute path of the homepage in the “to” field, and that saves, but a test shows no redirect happens.

Can you give some clues how to use the fields, exactly? Thanks!


The text persuades, the *notes prove。

Offline

#15 2016-08-23 20:04:58

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,159
Website

Re: arc_redirect

Would perhaps / work as the target url?


TXP Builders – finely-crafted code, design and txp

Offline

#16 2016-08-24 18:00:58

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 238
Website

Re: arc_redirect

Hi Destry,

Perhaps the documentation needs a bit of an update to include some clearer examples.

I’m not sure arc_redirect currently does what you’re after. It takes a literal source URL and redirects it, so you can’t set one rule to redirect all URLs from a given section to a specific rule. You’d need to define a rule for each URL. If someone’s interested in extending the plugin to support this I’d be happy to add it – just make a pull request on the repository.

If you want to redirect to the homepage using this plugin it is a simple case of using / in the ‘redirect’ field.

If you can edit the website’s .htaccess file I’d highly recommend that over using any redirect plugin as it will reduce the load on your server and your website will respond faster (better for SEO).

Offline

#17 2016-08-25 19:46:52

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

Re: arc_redirect

I’ll probably just do that, then; go with .htaccess for all future redirect needs and yank the two redirect plugins.

Thanks.


The text persuades, the *notes prove。

Offline

#18 2017-03-14 12:24:51

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,781
Website

Re: arc_redirect

Thanks Andy, this plugin is just what I needed. Jukka’s security audit engenders a lot of confidence, too. :)

Edit: Working beautifully so far. However, when I use the test feature on my dev server, I’m getting a 404 (not from Txp, but from the server). I’m sure it has to do with my server settings but would appreciate any hints.

Edit #2: OK, clear enough: the test feature uses the URL as written, even when it is a root-relative URL.

Edit #3: OK, I’m not awake yet. The issue is that I use a different subdomain for admin.

Edit #4: Sent you a PR on GitHub.

Last edited by jsoo (2017-03-14 13:11:58)


Code is topiary

Offline

#19 2018-11-24 09:49:43

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,159
Website

Re: arc_redirect

Hi Andy,

have recently upgraded a site to https:// but have not (yet) forced a redirect to https in .htaccess so that both http and https links still work. I’m using /relative-links in the “redirect from” field and the redirects are successful if the incoming link begins with http but not if the user (or their browser) uses https for the incoming link. Is there anything I can do to get it working reliably with https://… links?


TXP Builders – finely-crafted code, design and txp

Offline

#20 2018-11-24 13:26:47

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,159
Website

Re: arc_redirect

I made some mini alterations/simplifications to the redirection routine in the plugin that seem to have resolved the problem for me, although I’m not entirely sure why (I just used more of the built-in txp functions). If you fancy taking a look or correcting my alterations, take a look at my fork on GitHub. If I get some time, I may see if I can resolve the mini display glitches on txp 4.7. too.

Best wishes to you and the Steel City where I once lived many moons ago.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB