0

i installed apache server on my windows computer but i cant make this htaccess work:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(.*?)/?$ index.php?s=$1 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ index\.php\?s=([^\s]*)
RewriteRule ^/?(.*?)/?$ %1?%2%3 [L,R=301]

This htaccess works perfectly on my paid server (linux) and its supposed to convert queries into paths. Could any misconfiguration be preventing it from working?

Cain Nuke
  • 2,843
  • 5
  • 42
  • 65
  • Verify whether your `.htaccess` is enabled or not, by putting same garbage (random) text on top of your `.htaccess` and see if it generates 500 (internal server) error or not? – anubhava Mar 27 '14 at 06:42

1 Answers1

0

Did you check you Apache config file? Most likely the problem is your settings.

If you are using Apache 2.3.9 or greater the AllowOverride setting is None by default. Check you httpd.conf or apache2.conf file and look in the <directory> section and make sure it says AllowOverride All instead of AllowOverride None.

Panama Jack
  • 24,158
  • 10
  • 63
  • 95