Jump to content

Release: Redirects


apeisa

Recommended Posts

Hmm... strange. I am running almost latest version of P21 and ProcessRedirects without any problems. Have you tried uninstalling and installing again? Can you show me screenshot of redirects page (or if you are willing provide me with login credentials for a day or two that I can go and check what is wrong?).

EDIT: Also what is template in your /processwire/setup/redirects/ page? I assume it is admin and then Process is "processRedirects" since otherwise you shouldn't be able to add new redirects. But just in case.

Link to comment
Share on other sites

  • 2 months later...

when I enter some urls like

"/de/finanz/finanzberichte.aspx"

and when I click on it to edit, it says:  Error found in field 'redirect_from' - please check that it is a valid URL

It is valid and for some reason this doesn't show error (huh?):

"/de/corporate_governance/corporate_governance.aspx"

Some work some don't.

But on frontend they all don't seem to redirect ... ?

---

ok sorted it out , it'w working on the frontend now, I had urlsegments enabled on the root template for the "/" . So it didn't work, can you reproduce this?

The error is still shown on admin for some links. But can't see whats wrong. May todo with the .aspx bein evil? :)

Link to comment
Share on other sites

  • 7 months later...

I love this, it makes 301 redirects really simple. I seem to have found another URL scheme it doesn't support yet, though.

"Incoming" URL is /index.php?/pages/bfs_ka.html – when I edit the redirect, it reports an invalid URL in redirect_from.

Link to comment
Share on other sites

"Incoming" URL is /index.php?/pages/bfs_ka.html – when I edit the redirect, it reports an invalid URL in redirect_from.

Is that a valid URL? I'm not sure a variable name in a URL can have a slash in it, but I could be wrong. However, I don't think that the Redirects module will get the opportunity to ever see that URL. /index.php is a file that already exists (ProcessWire's /index.php). So requesting it directly sidesteps the whole Apache rewrite engine which maps non-existing file requests to ProcessWire. I think that the only way you could setup a redirect for a URL like this is by using Apache Rewrite rules in your .htaccess file.

Link to comment
Share on other sites

Is that a valid URL?

Well, at least the blog system which was used before on this site uses URLs like this (if you don't use mod_rewrite). And they work. :)

Okay, so I'll have to use mod_rewrite for that after all. Thanks, Ryan.

Link to comment
Share on other sites

If you've got a lot of URLs to deal with, you don't have to create separate redirects for each of them in your .htaccess if you don't want to. You could automate it. Setup a rewrite rule for "index.php?/" and redirect all of them to another directory where the old blog is, your own PHP script, or into ProcessWire (where you could let the Redirects module handle them). Let me know if I can be of assistance with the RewriteRule.

Link to comment
Share on other sites

  • 3 months later...

@ Antii,

Your module append the styles (ProcessRedirects.css?v=100) to the $config->styles when working in templates (front-end) also.

Maybee it's better to check if you're in the admin & then append the style.

For now "$config->styles->remove('/site/modules/ProcessRedirects/ProcessRedirects.css?v=100');" solves this 'issue'

BTW, I love your module..

Link to comment
Share on other sites

  • 3 months later...

I've just added some redirects and noticed a few things:

1. The bulk import only seems to add the first one in the list. I was entering them in the filed like this: page1.php, page2.php, page3.php etc

2. If I edit any exiting redirect I get this error, but the redirect does work.


redirect_from: Error found - please check that it is a valid URL (redirect_from)
Link to comment
Share on other sites

  • 1 month later...

Hi Antti

I knew this module existed but was looking for it in the modules section or on modules manager - could you add it please?

It's perfect for a site I'm about to launch to map a few stray URLs :)

Link to comment
Share on other sites

  • 1 month later...

Apeisa, you just develop the best modules :D Unfortunately this module does not work when used together with your Multisite-Module.

Is it possible to modify it so that these two work together? I tried to understand the code, but obviously I am a absolute beginner when it comes to PHP....

Link to comment
Share on other sites

Thanks for the kind words ezeey! Nothing works with multisite :)

I hope to find some time this weekend to take a look. If you can provide any more information it would definitely help (how to reproduce, test site I can login etc).

  • Like 3
Link to comment
Share on other sites

Besides PW being an amazing cms there are some amazing contributing coders here as well. I am loosing track of all the modules, tips and tricks coming out lately. Wished I could spend more time on PW but damn my job doesn't allow me.

  • Like 1
Link to comment
Share on other sites

1. The bulk import only seems to add the first one in the list. I was entering them in the filed like this: page1.php, page2.php, page3.php etc

2. If I edit any exiting redirect I get this error, but the redirect does work.

I just used the Redirects module a couple weeks ago (for cmscritic.com) and imported a hundred or so redirects from a CSV. I haven't run into either of these issues. You might want to double check that the CSV you imported from has proper linebreaks?

Link to comment
Share on other sites

  • 1 month later...

Hi, I have a funny problem with redirects.

I want to redirect from

/en/index.php   (which was a valid link on the website before the update to PW)

to

/en/

Works perfectly. 

But if I open the redirect settings for editing, the"from" link is empty and I get a warning "enter valid url".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...