I am constructing a webcomic site, but the chapter order has changed significantly. I have manually written the conversions for myself in a form like this:
36 -> 26.1
37 -> 28
38 -> 28.1
39 -> 29
40 -> 30
41 -> 30.1
Basically, following this guide, I want to convert all urls like http://www.domain.com/view.php?chapter=38
to the newer kind like http://www.domain.com/c28.1
.
I also want to ensure that those requesting a page number, like view.php?chapter=38&page=4
have their page numbers passed on to the redirect, like so: c28.1/p4.html
.
It would seem pretty simple, except that I have 70 or so of these to implement, and am a little worried if this significantly hurts site performance (is 70 a lot..?) and can't get the comic and page variables to properly rewrite.
So my question is, how do I achieve this, what is my best solution? If performance is no problem, I would prefer to keep it in the .htaccess with my other mod_rewrite code, but if the only reasonable way to do it is write a .php script and call on it to do the redirect, I can do that - though I don't really know how to get PHP to do that.
Please keep in mind that the 70 or so mentioned are the only ones I will ever have, so I don't care to make an easily-accessible database. I just want the redirects to work with minimal fuss.
I will be so grateful for any response. Thanks in advance if anyone can help me figure this one out.