I’ve been working on a vbulletin based site. As usual, I set up a dev site. This has been a lot troublesome. One of those troubles I run into is that when I try to login I get an error. The error says that the redirect URL is invalid. I’ve been trying to solve this issue for a couple of hours now, but nothing seemed to work. I cannot login to the admin area, so I need to change settings saved on the DB manually.
A few days ago, I performed a global search looking for the original site’s url, and replaced it with the url on my localserver. I thought this would be enough. This changes were made on the settings table. However, this did not fix the problem. I was still getting the invalid URL message.
I started reading about this on the net, and in a post it was suggested that a few lines be commented out on the functions.php file inside the includes directory. This did solve the issue, but I was not happy with this solution, because it did not solve the problem, just hid it. I wanted to solve the problem. So I started following the code on functions.php, and found out that my bburl was unchanged (
die($vbulletin->options['bburl'])). But how? I had already changed the value for the bburl on the settings table. I did another global search for the full URL of the original site, and found out that there was a row on the datastore table which has the title options where the value was present. I went on to edit the row’s value. The value is an array (a serialized array), which seems to populate the options member of the vbulletin object. This is the value used to determine is the redirect url is valid or not. The array member that I changed is the bburl.
For more info on this, I suggest you read the code of the
standard_redirect function in
includes/functions.php. Some sources that I found while solving this problem are listed bellow: