I’m really fed up. I’ve tried everything to get my pretty permalinks, but I still end up with either 500 or object not found messages. I am still trying to get it working in a local environment. I have Override set to all in my http.conf
file and my http-xammp.conf
file, FollowSymLinks in place and here’s my .htaccess
file:
Options -Indexes
Options +FollowSymLinks
# BEGIN WordPress
RewriteEngine On
RewriteBase /xampp/wordpress/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ /?file_name=$1 [L,QSA]
RewriteRule ^([^/]+/[^/]+)/([^/]+)/([^/]+)(/.+)?$ $1$4?$2=$3 [QSA,N]
RewriteCond $1 !.+.xyz$
RewriteRule ^([^/]+/[^/]+)$ $1.xyz [L]
# END WordPress
but I still end up with errors! I’m new to the whole htaccess thing so any help would be greatly appreciated.
The error I’m getting now is:
“C:/xampp/htdocs/xampp/wordpress/.htaccess: RewriteEngine not allowed here, referer: http://www.mydomain.com/xampp/wordpress/wp-admin/options-permalink.php“
but I’m an administrator and I have full control? Any thoughts?
The error you’re getting means that the proper override isn’t turned on. Htaccess files “override” settings defined by the config files, and the
AllowOverride
directive in the config files determine what type of settings can be overridden by htaccess files. As you can see in the Apache mod_rewrite documentation there’s a listing for each directive for Override, that means you need to set that in the config.Somewhere in your xampp config files you should see a
AllowOverride
directive. You can either addFileInfo
to that list, or you can change it toAll
:or
This should allow you to use mod_rewrite directives in your htaccess files.
EDIT:
Take a look at the Apache docs for
AllowOverride
, you need to put it in a<Directory>
container. So something like this:You have to make sure that the “/path/to/your/xampp/wordpress” is the absolute physical file path where your htaccess file is, and not the URI path (the path you’d see in, say, the URL). This means your htaccess file would be in
/path/to/your/xampp/wordpress/.htaccess
.I think the issue here will be that you have the folder in the
htdocs/xampp/
folder. If I remember correctly XAMPP has this folder set up in a certain way and that is likely to cause the problem. Move thewordpress
folder into yourhtdocs
folder and it should work as expected