Viewing 1 replies (of 1 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    This works of my WordPress installation, sort of.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^search/country/(.*)$ http://%{SERVER_NAME}/blog/?search=1&country=$1 [L]
    </IfModule>

    This assumes that WordPress is installed in /blog/ and that’s where the .htaccess file is.

    So http://my-test-dumy/blog/search/country/usa is confirmed in my logs to be rewritten as http://my-test-dumy/blog/?search=1&country=usa

    But since there is no handler for those parameters all I get is my test installation.

    Taking the /blog/ out of the rewrite rule will send that to the root.

    RewriteRule ^search/country/(.*)$ http://%{SERVER_NAME}/?search=1&country=$1 [L]
Viewing 1 replies (of 1 total)

The topic ‘htaccess not working’ is closed to new replies.