• Resolved Jack

    (@hifriend)


    I want to redirect old url to new url but it doesn’t work

    Contents of htaccess file:

    RewriteEngine On
    Redirect 301 /page/1 https://www.domain.com

    RewriteEngine On
    RewriteRule ^page/1$ /? [L,R=301]

    RewriteEngine on
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule ^page/1$ https://www.domain.com/? [R=301,L]

    • This topic was modified 1 year ago by Jack.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Do you have your WordPress rules in the .thaccess file?
    If so, WordPress rewrite rules take precedence and handle the request before it reaches your custom rule. You can try writing your custom rule before the #BEGIN WordPress... line.

    To ensure that you are seeing the current behavior of your .htaccess rules, clearing your browser cache, or using an incognito/private browsing window to test changes is a good practice.

    Thread Starter Jack

    (@hifriend)

    Already solved

    Thank You Very Much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Htaccess redirect not working’ is closed to new replies.