htaccess rewrite to nginx?

dotpro

Active member
Hello,

I need some help with converting htaccess rewrite to work with nginx/centminmod. I recently converted from vb3 and photopost gallery to xenforo and this worked on apache to redirect old thread and photopost photo URLs to new xenforo ones.

RewriteRule ^forums/[^\./]+/[^/]+-([0-9]+)(/|$) /directory/forums/t/$1/ [R=301,L]

RewriteRule ^pictures/[^\./]+/p([0-9]+)(-[^\./]+)?\.html$ /directory/images/$1/ [R=301,L]

thanks
 
Okay, i figured it out.
Can I ask how you did it?
I recently found a way to add expire times to images etc (static not gallery etc) and it was all for htaccess, but we're using the same set up to you and want to add expiry times to static images and a few other bits, so would be grateful for the tips?


I used https://winginx.com/en/htaccess when I went from apache --> nginx
Also tried this but the convert seemed to miss things out and didn't seem to include everything we needed from a htaccess add, oddly..
 
Can I ask how you did it?
I recently found a way to add expire times to images etc (static not gallery etc) and it was all for htaccess, but we're using the same set up to you and want to add expiry times to static images and a few other bits, so would be grateful for the tips?



Also tried this but the convert seemed to miss things out and didn't seem to include everything we needed from a htaccess add, oddly..

I went through the redirect after the converter converted it and fixed things as it was adding [R=301,L]. Also, fixed the right route filter/path.


Now, that photos from photopost and threads from vB3+vbSEO (custom config) redirecting correctly. I need to redirect the old forum and photopost home directories as well. When user lands on those, it gives 403 forbidden errror.
 
Back
Top Bottom