S
S
Sergey Yakovlev2015-09-28 00:46:56
MODX
Sergey Yakovlev, 2015-09-28 00:46:56

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

2 answer(s)
R
Ruslan, 2015-09-28
@Serginhio

Right after the line
RewriteBase /
paste
maybe it will work
2 more times for youRewriteEngine On

S
Sergey Yakovlev, 2015-09-28
@Serginhio

Oh yeah!. For some reason I couldn't get it to work yesterday. Toli cash, roofing felts really the second one RewriteEngine Onis to blame.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question