I'm struggling to implement a URL change on a site. Firstly I'm wanting to only implement this URL change at a subdirectory level.. I have WordPress installed at the root but I'm in the process of creating a custom classifieds section. This sits in the directory /classifieds/. As a result I only want to rewrite URLs in this subdirectory.
I've managed to get the rewrite working correctly for just the classifieds subdirectory as required with a 301 performed and trailing slash added for SEO. The only problem I've got is none of my pages are passing query string values. How can I modified my .htaccess code below so it will enable querystrings to be passed between pages?
IndexIgnore *
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*[^.]+\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*[^.]+)\.php$ http://www.mysite.com/classifieds/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ http://www.mysite.com/classifieds/$1/ [R=301,L]
redirect 301 /classifieds/index/ http://www.mysite.com/classifieds/
Thanks in advance for all help!