• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Help with phpbb3 attachments rewrite...

#1
Hello, after importing to xen and using redirects. Few attachment url's are not working. How ever the attachment is on the database.

So, how do i redirect this
Code:
/download.php?id=77276
to this
Code:
/attachments/77276
 
Last edited:

Jake Bunce

XenForo moderator
Staff member
#4
Assuming those are root locations, add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)id=([0-9]+)($|&)
RewriteRule ^download\.php$ /attachments/%2/? [R=301,L]