Custom Rewrite Rules
-
I’m trying to add a custom rewrite rule to my .htaccess file for WordPress.
Here’s what I have, done according to the instructions in the WordPress Codex:
<ifmodule mod_rewrite.c> rewriteEngine On rewriteBase / rewriteRule ^comments/post/$ /about/ </ifmodule> # BEGIN wordpress <ifmodule mod_rewrite.c> rewriteEngine On rewriteBase / rewriteCond %{REQUEST_FILENAME} !-f rewriteCond %{REQUEST_FILENAME} !-d rewriteRule . /index.php [L] </ifmodule> # END wordpress
Try as I might, I just can’t get /comments/post to go to the about page. (In the future, it will go to a different page that I haven’t set up yet, and not the about page.)
- The topic ‘Custom Rewrite Rules’ is closed to new replies.