Can I Get Some mod_rewrite and Wordpess Help Please

megatabbers

New member
Jul 21, 2009
1,284
29
0
Boston, MA
I have a script that tracks links for me with $_GET parameters, e.g.

http://www.domain.com/linktrack.php?id=1

I also use mod_rewrite to turn this into:

http://www.domain.com/go/1

with the following code:

Options +FollowSymLinks
RewriteEngine on

RewriteRule ^go/(.*) linktrack.php?id=$1 [QSA]

However, this is not working when I put it into the .htaccess file I'm using for Wordpress' %postname% annotation:


# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName domain.com
AuthUserFile /home/xxxx/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xxxx/public_html/_vti_pvt/service.grp

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Sticking my RewriteRule just above /IfModule doesn't work. Can someone offer some suggestions to get my script working again? Thanks.
 


Cool. Yeah mod_rewrite is so awesome. Still gives me fits everytime, but it's great how you can do so much with so little.

In this case, the lines ...

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]

... were catching requests like /go/1 because they match anything where the file doesn't exist. So you bypass those by putting your more specific rule higher up in the order.