301 redirect not added

#50800
  • `I changed the url of a post via the rank math snippet editor; however, now the old post url goes to a 404 error.

    When I add a 301 redirect to fix it via the redirection tool in RankMath, I cannot add it. Maybe I am making a mistake?

Viewing 15 replies - 1 through 15 (of 23 total)
  • Hello,

    Thank you for contacting Rank Math today.

    The access details you provided don’t seem to work for me. You can check here to understand how to set up redirections in Rank math https://rankmath.com/kb/setting-up-redirections/

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Todd
    Rank Math free

    Hi,

    I am sorry but can you please try and repair your database? It seems like the fields are not getting saved correctly to your database.
    https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin

    If you are not sure, please share your FTP/cPanel logins with us so we can take a closer look for you.

    Thank you.

    Is it a specific table that needs repairing?

    Ok, checked and I have the same issue as noted here https://support.rankmath.com/reply/10913/

    Todd
    Rank Math free

    Hi,

    Did you manage to add that table back?

    If not, please share your cPanel logins with us so we can check it for you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    You didn’t add cPanel link in the Sensitive Data Section. Please add it and leave a message here.

    Looking forward to helping you.

    hi, what is cPanel?

    Hello,

    Thank you for contacting Rank Math today.

    cPanel is the Control Panel we can use to access and manage your site database

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi Michael, sorry I don’t have anything like that on my server/hosting account. Must do everything via MySQL Workbench.
    Which tables should we have in the db for rank math? I have only 4 tables.

    Hello,

    Thank you for contacting Rank Math today.

    Rank Math creates the following database tables:

    	rank_math_404_logs	 	
    	rank_math_internal_links	 	
    	rank_math_internal_meta	 	
    	rank_math_redirections	 	
    	rank_math_redirections_cache	 	
    	rank_math_schema	 	
    	rank_math_schema_cache	 	
    	rank_math_sc_analytics

    You can use the following example SQL to create the missing table:

    
    <code>DROP TABLE IF EXISTS</code>{database-prefix}_rank_math_redirections

    ;
    CREATE TABLE IF NOT EXISTS {database-prefix}_rank_math_redirections (
    id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    sources text COLLATE utf8mb4_unicode_520_ci NOT NULL,
    url_to text COLLATE utf8mb4_unicode_520_ci NOT NULL,
    header_code smallint(4) UNSIGNED NOT NULL,
    hits bigint(20) UNSIGNED NOT NULL DEFAULT ‘0’,
    status varchar(25) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ‘active’,
    created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    updated datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    last_accessed datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    PRIMARY KEY (id),
    KEY status (status)
    ) ENGINE=MyISAM AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;`
    `

    You can also share the current access that you have and we will be happy to help further.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello Michael,
    My DB is missing the 4 tables below

    rank_math_redirections
    rank_math_redirections_cache
    rank_math_schema
    rank_math_schema_cache

    I input the code you supplied, but I get this error :

    Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'β€˜0’, status varchar(25) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT β€˜a' at line 6
    

    It appears it doesn’t like this line
    hits bigint(20) UNSIGNED NOT NULL DEFAULT β€˜0’,

    However, as I am missing 4 tables, this is a bit frustrating. I’ll add some more info in the sensitive data to see if you all can see anything.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math today.

    Do you have Rank math redirections and schema modules enables in your Rank math dashboard?
    I have rechecked the above query and it seems there was an issue with the quoting. I rewrote it again and validated, this should work:

    CREATE TABLE IF NOT EXISTS rm_rank_math_redirections (
      id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
      sources text COLLATE utf8mb4_unicode_520_ci NOT NULL,
      url_to text COLLATE utf8mb4_unicode_520_ci NOT NULL,
      header_code smallint(4) UNSIGNED NOT NULL,
      hits bigint(20) UNSIGNED NOT NULL DEFAULT '0',
      statuss varchar(25) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'active',
      created datetime NOT NULL DEFAULT '0000 -00 -00 00 :00 :00',
      updated datetime NOT NULL DEFAULT '0000 -00 -00 00 :00 :00',
      last_accessed datetime NOT NULL DEFAULT '0000 -00 -00 00 :00 :00',
      PRIMARY KEY (id),
      KEY status (status)
    ) ENGINE = MyISAM AUTO_INCREMENT = 68 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_520_ci;
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 15 replies - 1 through 15 (of 23 total)

The ticket ‘301 redirect not added’ is closed to new replies.