XF 1.4 vB4 URL Redirection isn't working with new forum directory

Ahmed

Well-known member
After moving from vB4 and changing old URLs are not working when I change forum directory. If I keep old forum directory they redirect just fine. Example:
Code:
http://www.mysite.com/new_dir/showthread.php?t=xxx
The above linke get redirected just fine to:
Code:
http://www.mysite.com/new_dir/threads/xxx/

But this:
Code:
http://www.mysite.com/old_dir/showthread.php?t=xxx
gives me a 404 Not Found error when it should take me to:
Code:
http://www.mysite.com/new_dir/threads/xxx/

My setup:
Any suggestions?
 
You can upload a copy of those redirect scripts to the old_dir as well. Just be sure to edit the 301config.php file to specify the path to your XF directory.
 
Thanks Jake.

A while after posting my question I got it working with the rule:
Code:
location ~ /old_dir{
    rewrite ^/old_dir/(.*)$ /new_dir/$1 permanent;
}

However, that only worked for threads, but not for forums. When I try a forum page, the redirect script "forumdisplay.php" gets downloaded. Any ideas why?
I was too sleepy last night so I didn't update my post.
 
Top Bottom