Answer the question
In order to leave comments, you need to log in
How to make redirects for every rewrite?
I have a lot of rewrites in htaccess, how can I make it so that each one has a redirect to a link with a slash at the end, if there is no slash at the end of the link?
Example:
RewriteRule ^([0-9]+)/$ /index.php?page=$1
RewriteRule ^news/$ /index.php?mode=news
RewriteRule ^articles/$ /index.php?mode=articles
RewriteRule ^posts/feedback/$ /index.php?mode=posts
RewriteRule ^([0-9]+)$ /$1/
RewriteRule ^([0-9]+)/$ /index.php?page=$1
RewriteRule ^news$ /news/
RewriteRule ^news/$ /index.php?mode=news
RewriteRule ^articles$ /articles/
RewriteRule ^articles/$ /index.php?mode=articles
RewriteRule ^posts/feedback$ /posts/feedback/
RewriteRule ^posts/feedback/$ /index.php?mode=posts
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question