Apache Rewrite Not Working

Hi. I have:

  1. enabled mod rewrite via SSH.
  2. Checked apache syntax.
  3. Rebooted server.
  4. Have directive in apache site conf
    still .htaccess rules not working. here is my .htacces file.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteCond %{QUERY_STRING} ^action\=subscriptions$
RewriteRule ^usercp\.php$ /subscription [QSD,L]

my url is mysite.com
i have many pages such as

  1. mysite.com/usercp.php?action=subscription
  2. mysite.com/usercp.php?action=options

i wanna rewrite line 1 (subscription) to mysite.com/subscription
but wanna keep the line 2 as it is.
Please help, I don’t know what I am doing wrong.
Anyways, I appreciate you guys for investing your time in such a good community.

Your URL says:

mysite.com/usercp.php?action=subscription

(subscription, singular)


but your RewriteCond says:

RewriteCond %{QUERY_STRING} ^action\=subscriptions$

(subscriptions, plural)


One of these is wrong, methinks :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.