DouglasUK |
08-17-2016 10:15 AM |
Quote:
Originally Posted by bridge2heyday
(Post 2572139)
Well , this will require one or two file edits
in file 'includes/vb5/frontend/routing.php'
line 239 just before throwing
PHP Code:
throw new vB5_Exception_404("invalid_page_url");
I have made some work
I used $path variable , exploded it and got the last element .. then queried node table for urlident equal to this value .
if true .. this returns node id
Then
PHP Code:
$url = vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($id);
header('Location: ' . $url, true, 301);
exit;
I did this for a client who converted from smf with pretty URLs and working fine
I will post the full code when I have access to my home PC tomorrow.
Note : if the URL doesn't end with '/' you have to do additional work in includes\api\interface\collapsed.php'
|
Is there any chance you could post your query, too, please? I am new to programming vb5 and while I could work it out, you know how many days that could take me over simply seeing what you are doing and learning the quick way. So, if you have the full code for your solution, that would be ideal.
|