I am trying to redirect these pages
/reviews/page/2/
/reviews/page/3/
to this
/reviews/
using this line:
Redirect 301 /reviews/page/./ /reviews/
But it's not working. I've tried other combinations like .*
and ^.*$
but nothing works. Only a specific URL will get redirected to the new one.
Is there anything else that could interfere with the line I'm trying to work? Maybe space, uppercase, lower case, indent, etc?
The whole file is pasted below.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# --------------------------------
# | ADDITIONAL RULES |
# --------------------------------
<FilesMatch "^robots\.txt">
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "^\.htaccess|.*\.cgi">
Order Deny,Allow
Deny from all
</FilesMatch>
Redirect 301 /reviews/page/./ /reviews/