0

How can I get this page (using my .httacess file)

/visible.php?id=8

to redirect to this page

/about-us/activities/

my rewrite rule doesn't seem to work?

RewriteRule ^visible.php?id=8$ /about-us/activities/ [R=301,L]

I don't know if it matters but I'm using the craft CMS.

Redirect 301 /visible.php?id=8 /about-us/activities/

Does not work either.

andreas
  • 16,357
  • 12
  • 72
  • 76
garyconstable
  • 309
  • 3
  • 15

1 Answers1

0

This will be a server issue, and nothing to do with Craft.

First, you check your server is actually running Apache. If it isn't .htaccess is never going to work. If it is then it is most likely an Apache configuration issue, if allowOveride is not enabled then .htaccess will not work.

If you do not have root access to your server then you will not be able to reconfigure Apache to allow that, so you would need to talk to your hosting provide.

If you do have root access then check the Apache configuration file (typically either called httpd.conf or apache.conf) and check the AllowOverride directive is set to AllowOverride All. If you make configuration changes you will need to restart Apache with sudo service apache2 restart before they have any effect.

Seth Warburton
  • 2,234
  • 1
  • 16
  • 17