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()));
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | redirect.jpg | 140.48 KB | drew29 |
| #5 | Clipboard01.jpg | 22.2 KB | natrio |
Comments
Comment #1
dave reidI am confused. Are you using "node/x" or aliases of nodes that currently exist?
Comment #2
natrio commentedI 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 :)
Comment #3
dave reid@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?
Comment #4
dave reidComment #5
natrio commentedSorry...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
Comment #6
drew29 commentedHello,
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
Comment #7
natrio commentedYes, 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?
Comment #8
dave reidOld 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/', '')"Comment #9
natrio commentedWell, 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
Comment #10
giorgio79 commentedHello,
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
Comment #11
imclean commented+1 for this problem with 1.0-beta3.
Redirect from /mypath/page fails. The page simply displays.
Redirect from /node/12 works.
Comment #12
dave reidFixed 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.