MODX Community

Alias and 301 redirect

I’m using alias like this : https://mydomain.com/fr/page1

This resource is not available anymore and a new resource replace it : https://mydomain.com/fr/new-resource

I’m lookign for a way to make 301 redirect.

I have tried with new lines on .htaccess :

 Redirect 301 ^/fr/page1$ https://mydomain.com/fr/new-resource

… but it doesn’t work.
An url like this is generated with 404 error :

 https://mydomain.com/fr/new-resource?q=fr/page1

I also tried with Redirector addon, without success…

What did I miss ?

1 Like

Try dropping the 301, ^ and $ from the htaccess redirect

Redirect /fr/page1 /fr/new-resource

1 Like

I still have “Page not found The page you requested was not found.” :frowning:

1 Like

I have solved the issue !
I think there were a problem with old SEO Pro and Redirector extensions which made conflicts with the .htaccess redirections.

After deep cleaning (database entries, MODX cache…), I have set with success this .htaccess syntax :

 RewriteRule ^fr/page1$ https://domain.com/fr/new-resource  [R=301,L]
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.