anyone using .htaccess on xampp?

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
I'm trying to use mod_rewrite on xampp and I've got a problem that I've narrowed down to implementing .htaccess. I've got a rewrite rule

Code:
<IfModule rewrite_module>
RewriteEngine on
RewriteRule ^/shortcut$ /feeds
</IfModule>

obviously nice and simple - this works when in httpd.conf but it doesn't work if I create an htaccess file in my root directory and place the exact same rule in there! can anyone think why this might be? I've tried chmod 777 the .htaccess, that doesn't work. I'm tailing my error log and that's not throwing anything related to htaccess so I'm completely stuck! AllowOverride is set to all everywhere in httpd.conf.

can anyone help? :)
 
yeah, mod rewrite's working but it won't allow me to do it via htaccess, only if the rewrite rules are defined in httpd.conf
 
Have you got an AccessFileName directive somewhere in your httpd.conf?

Code:
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
 
I didn't, but now I do and it's still not working :( it's not a huge deal, I'll just have to use my conf file for mod rewriting and copy it to an htaccess when I put it on a server
 
It might be an AllowOverride issue. Edit your virtualhost and add an "AllowOverride All":

Code:
<VirtualHost *:80>
 DocumentRoot /path/to/docroot
 ...

 <Directory /path/to/docroot>
    AllowOverride All
 </Directory>
</VirtualHost>
You might also want to search your config files for any exisiting AllowOverrides that might be causing problems. If there's one in your main httpd.conf, that will likely be the master setting.
 
Back
Top Bottom