Answer the question
In order to leave comments, you need to log in
How to set up an external redirect in modx evo?
Good day to all. There was a hundred-year-old site on modx, moving to a new one.
I set up a page redirect and get newsite.ru/new.html?q=old.html in the address bar .
How to overcome it is not clear.
#301 redirect
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
redirect 301 /old.html http://newsite.ru/new.html
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Answer the question
In order to leave comments, you need to log in
Right after the line
RewriteBase /
paste
maybe it will work
2 more times for youRewriteEngine On
Oh yeah!. For some reason I couldn't get it to work yesterday. Toli cash, roofing felts really the second one RewriteEngine On
is to blame.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question