Error 404 when defining URL in mod_rewrite

1

Good

I'm trying to change the URL's on my site as per the example below of the .htaccess file but I end up going to the localhost's "Object not found, Error 404" page.

Here is the code from my .htaccess file:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^country=(.*)$
RewriteRule ^country/([A-Za-z0-9-]+)*/?$ country.php?country=$1 [NC,R]

In other words, I'm trying to change the page country.php? country = Italy, for country / Italy.

Apache http.config has been changed with this code:

<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all   

And the .htaccess is in the htdocs folder of Xampp.

Thanks for your help.

    
asked by anonymous 01.10.2017 / 01:35

0 answers