.htaccess – Is WP Killing My Rules?
-
I’m writing a plugin currently, and I’m needing to add a rule to my .htaccess file to complete its functionality. I’m trying to redirect requests from /go/alphanumericstring to /index.php?gocode=alphanumericstring. I’ve been trying to get my rewrite rule working for a couple hours now, but it’s still not working. Here’s my .htaccess file:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /sites/test-wp/ RewriteRule ^go/([A-Za-z0-9]+)/?$ /index.php?gocode=$1 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /sites/test-wp/index.php [L] </IfModule> # END WordPress
The bold line is the one that I am having trouble with. I’ve tried several iterations of it, moved it to different locations in the file, and even put it above the “Start WordPress” line (with a RewriteEngine On line, of course). Nothing is working.
Does anyone have a solution?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘.htaccess – Is WP Killing My Rules?’ is closed to new replies.