Reputation: 1087
I want to redirect URL
domain/Family_He..
to
domain/Family_Health_insurance
using RewriteRule. I have tried with
RewriteRule /Family_He(.*)$ /Family_Health_insurance
and it is working. But I have some more page with urls like
domain/Family_Health_info
domain/Family_Health_quote
domain/Family_Health_child etc
When I tried as
RewriteRule /Family_He\.\.$ /Family_Health_insurance
then this won't works for me. Please help me out.
Upvotes: 0
Views: 197
Reputation: 16825
To have it redirect (302) you need to add the R
flag. To match the dot you need to escape it using \.
like
RewriteRule ^/Family_He\.\.$ /Family_Health_insurance [R=302,L]
Note that the leading slash doesn't work in htaccess, only in httpd.conf
Upvotes: 0
Reputation: 5237
Are you aware that there are actually two spaces at the end of your subject string that would prevent \.$
(a literal dot at the end of the string) from matching?
Upvotes: 1