Title: htaccess / php function / super cache bug
Last modified: August 21, 2016

---

# htaccess / php function / super cache bug

 *  [Tobys](https://wordpress.org/support/users/tobys/)
 * (@tobys)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/htaccess-php-function-super-cache-bug/)
 * This bug is pretty weird, I have tried almost anything to resolve it.
 * So I use the WordPress theme/function/template on a non WordPress site.
 * Everything works fine – except my pagination.
 * htaccess:
 *     ```
       RewriteRule ^something/page([0-9]+)/$ /something/file.php?page=$1 [NC,L]
       ```
   
 * So inside file.php i have this function, which uses the current page to make 
   pagination.
 *     ```
       someFunction(page=1) {
       function...
       }
       ```
   
 * file.php:
 *     ```
       $page = $_GET['page'];
       echo $page;
       someFunction($page);
       ```
   
 * The echo will show the correct page, but the function will use default of 1.
 * If I change the htaccess and include a “-” between the page and number it works
   fine:
 * `RewriteRule ^something/page-([0-9]+)/$ /something/file.php?page=$1 [NC,L]`
 * Can someone help me with this strange mystery ?
 * [http://wordpress.org/plugins/wp-super-cache/](http://wordpress.org/plugins/wp-super-cache/)

The topic ‘htaccess / php function / super cache bug’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Tobys](https://wordpress.org/support/users/tobys/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/htaccess-php-function-super-cache-bug/)
 * Status: not resolved