Q:

simple redirect using .htaccess is not working

I'm trying to create a simple redirection that all my request for user/55 will be redirected to
folder2/index2.html
I'm doing on the tests on localhost running wamp.
My project hierarchy is:

I defined .htaccess like that:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^users/55 folder2/index2.html [R=301,L]

My main page is index1.html and it looks like that:
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <h1>Index1 page</h1>

    <a href="users/55">go to second page</a>
 </body>
 </html>

When I pressed the link there is no redirection instead I get the error:
The requested URL /redirect/folder1/users/ was not found on this server.
I enabled mod_rewrite on Apache server and I see not errors in the logs.
What am I doing wrong I try to follow a simple guide and it is not working.

A:

I think this is just because the url in your anchor tag is a relative url.
<a href="users/55">go to second page</a>

The above will link to /redirect/folder1/users/
If you want to link to /redirect/users you can try
 <a href="/redirect/users/55">go to second page</a>

