Softaculous


Topic : Can't get htaccess 301 redirects to work


Posted By: pb1uk on January 20, 2016, 10:04 am
Hello,

I'm trying to test out some 301 redirects in an htaccess file on ampps before I move the code to my live site but i can't seem to get them to work.

I've added tested my htaccess file using deny for all, which works so it is being found, but the redirects won't work.

The htaccess file is in a sub folder of my route directory that just contains a blank index file, the path is localhost/test-htaccess

My htaccess file then currently looks like this:

Code

RewriteEngine On
Redirect 301 /test/?$ /test-redirect


As part of my test i'm trying to make it redirect /test or /test/ to /test-redirect.

I've checked the apache config and the correct module looks like it is switched on too.

Can anyone advise where i'm going wrong?

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.