in the function path_redirect_check() there is not a conversion from drupal normal path(node/xx) to aliases.
In my installation it works only if I use a from in the node/xx format.

I added the following row in the function path_redirect_check() :
$path = substr(request_uri(), strlen(base_path()));

CommentFileSizeAuthor
#6 redirect.jpg140.48 KBdrew29
#5 Clipboard01.jpg22.2 KBnatrio

Comments

dave reid’s picture

I am confused. Are you using "node/x" or aliases of nodes that currently exist?

natrio’s picture

I don't know whether my problem is the same problem with netlord, but after upgrading to beta-3, my 301 redirection isnt working. My sample redirect is:

old url = http://www.nontonbioskop.com/index.php/news/1997
new url = http://www.nontonbioskop.com/news/statham-siap-main-dalam-transporter-3

url alias = "news/statham-siap-main-dalam-transporter-3" ---> node/1997
path-redirect = "index.php/news/1997" ---> node/1997 --- type: 301

so, going to http://www.nontonbioskop.com/index.php/news/1997 will go straight to my frontpage.

@netlord: what line did you put that fix (it's a fix, right?)? I tried putting it after line 120, but still no change..

Note: I'm reverting back to using .htaccess redirect for now, so if you try the old url above it will work :)

dave reid’s picture

@natrio: In this case, enter the "from" url as "news/1997" and not "index.php/news/1997" and it should work just fine. Do you mind actually attaching a screenshot of your admin/build/path-redirect/add page as well for me?

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)
natrio’s picture

StatusFileSize
new22.2 KB

Sorry...I havent' been able to reply till now,

@Dave Reid: I tried that, but it is giving me 404 error.
Attached is my path-redirect screenshot

drew29’s picture

StatusFileSize
new140.48 KB

Hello,

I have the same issue it is the same with the dev version. redirect doesn't work :-(

Edit: when I create a new alias then it works perfectly, only the old exists aliases doesn't work.

kind regards
drew29

natrio’s picture

Yes, I can also confirm that creating a new alias (based on my sample url above) using: http://www.nontonbioskop.com/berita/1997 is working perfectly.

But, when I tried another alias using "'/index.php/" in the url, it failed to redirect:
http://www.nontonbioskop.com/index.php/berita/1997

@drew29: did you also using "index.php" in the url?

dave reid’s picture

Old redirects that include 'index.php' in them that you may have added before I started improving the path matching code will probably not work. You will need to delete and re-add them. Or you could probably run a SQL command like "UPDATE {path_redirect} SET path = REPLACE(path, 'index.php/', '')"

natrio’s picture

Well, I was moving my old site on another cms which has 'index.php' on every content to drupal so I had to redirect them to the new preferred aliases (drupal way..hehe). Fortunately I can still use a some redirect rules in .htaccess to redirect them and google already picked up most of my new aliases, so it's all good.
Thanks alot for the help guys!

Cheers
Natrio

giorgio79’s picture

Hello,

I may be having the same issue with the latest beta and dev version.

When I create a first alias it works fine, like
mysite.com/node/1 to mysite.com/dogs

but if I create a new alias like
mysite.com/dogs to mysite.com/new-dogs

The old alias does not redirect to the new one even though the redirect exists in the redirect table, meaning
mysite.com/dogs points to node/1
and node/1 points to new-dogs

Hope this is clear :)

UPDATE: Downgrading to path_redirect 6.x-1.0-beta1 fixed this issue :) Not too elegant I know, but will try to look for the cause

imclean’s picture

+1 for this problem with 1.0-beta3.

Redirect from /mypath/page fails. The page simply displays.

Redirect from /node/12 works.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

Fixed with latest code.

@giorgio79: Not sure exactly what you're doing, but if you're just creating aliases, that does not create redirects. File a new issue if you're still having a problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.