Answer the question
In order to leave comments, you need to log in
How to properly rewrite in htaccess?
Good afternoon! I'm trying to translate the site to new urls.
You need to do redirects like
Redirect 301 /news.php /news
Redirect 301 /pages/about /about
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/pages/about
RewriteCond %{REQUEST_URI} !=/pages/articles
RewriteCond %{REQUEST_URI} !=^/pages/articles/(*)$
RewriteRule ^(.*)$ index.php?query=$1 [QSA,L]
</IfModule>
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