.htaccess and arithmetic
-
Is there any way to subtract a value from a parameter in an .htaccess file?
I’m replacing an old cgi script with WordPress.
Right now, I have something like this:RewriteCond %{QUERY_STRING} 4&([0-9]+)
RewriteRule ^list\.cgi$ /noidea/index.php\?p=%1 [R]Now, this works fine to direct
list.cgi?4&1
to/noidea/index.php?p=1
.But, with my old script, I started at 0, and
index.php?p=0
won’t work. So, I’m going to have to start my WordPress entries at 1, and then redirectlist.cgi?4&0
toindex.php?p=1
andlist.cgi?4&1
toindex.php?p=2
and so on.But I don’t know how to do arithmetic within .htaccess. How do I do so?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘.htaccess and arithmetic’ is closed to new replies.