views:

22

answers:

2

I know I can do a redirect using a PHP header in a directory but I want to do it in a tidier fashion with the use of .htaccess. I've looked at all the answers and other examples but they seem to be ignored? I am using the .htaccess file placed in the root of the site directory.

I want subdomain.domain.com/directorya to redirect to subdomain.domain.com/directoryb

The rule I am using:

redirect 301 directorya directoryb

But the rule is just being ignored and I get the 403 Forbidden error from the Lightspeed server.

A: 

You said lightspeed server. But .htaccess got its start with (what is now called) apache. So the first step is check to make sure that your server follows the same rules; most online instructions for installing something cover Apache primarily.

Next step: make sure that the .htaccess is readable to the server-user and not writable or executable to the server user or other untrustworthy accounts such as GUEST. Otherwise, the server probably won't trust the file.

Ian
A: 

I can't comment about lightspeed, but in apache you need to specify path from root for the file being redirected (i.e. /subdir/file.ext) and absolute URI to redirect to (i.e. http://myhost.com/dir/newfile.ext). Probably the same applies to Lightspeed.

Eugene Mayevski 'EldoS Corp