Title: Update data redirection
Last modified: September 2, 2016

---

# Update data redirection

 *  [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/)
 * (@webmasterjgb)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-data-redirection/)
 * Hi!
 * I’m having a problem with the redirection after i try to update the data from
   a table. when i try to update it redirects me to the wordpress login interface
   and the changes don’t take effect.
 * Thanks in advance for your help

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8137217)
 * Hi there,
 * If you are blocked to access specific files by using as like “.htaccess”. Please
   check whether the “wp-admin.php” is allowed by using in ajax process.
 * Please try to refer below:
 * [https://wordpress.org/support/topic/using-htaccess/](https://wordpress.org/support/topic/using-htaccess/)
 * Thank you
 *  Thread Starter [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/)
 * (@webmasterjgb)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8186794)
 * Hi!
 * I paste that code in my htaccess but still no result. I can’t update the data
   of any row in my table, it redirects me out of the folder where my wordpress 
   is:
    when i try to update [https://snag.gy/HbKplN.jpg](https://snag.gy/HbKplN.jpg)
 * After I press Update here’s where it redirects me
    [https://snag.gy/QaRsmr.jpg](https://snag.gy/QaRsmr.jpg)
 * this is the htaccess i use in the public folder to redirect to “inner” folder
   where my wordpress is :
 * # BlueHost.com
    # .htaccess main domain to subdirectory redirect # Do not change
   this line. RewriteEngine on # Change example.com to be your main domain. RewriteCond%{
   HTTP_HOST} ^(www.)?intranet$ # Change ‘subdirectory’ to be the directory you 
   will use for your main domain. RewriteCond %{REQUEST_URI} !^/inner/ # Don’t change
   the following two lines. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}!-
   d # Change ‘subdirectory’ to be the directory you will use for your main domain.
   RewriteRule ^(.*)$ /inner/$1
 * # Change example.com to be your main domain again.
    # Change ‘subdirectory’ to
   be the directory you will use for your main domain # followed by / then the main
   file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?
   intranet$ RewriteRule ^(/)?$ inner/index.php [L]
 * <FilesMatch “(admin-ajax.php)$”>
    Satisfy Any Order allow,deny Allow from all
   Deny from none </FilesMatch>
 * I appreciate any help
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8194493)
 * Hi there,
 * I probably understood the cause of your problem by provided screenshot.
    That’s
   contained the “inner” as middle path in your permalink structure.
 * Please try to add code in your functions.php as follews:
 *     ```
       function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){
         if ( is_admin() && $shortcode_name === "cdbt-edit" ) {
           $component_options['actionUrl'] = admin_url( $component_options['actionUrl'] );
         }
         return $component_options;
       }
       add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );
       ```
   
 * Also, because your problem have not related in “.htaccess”, please remove the
   modified code in past.
 * Thank you,
    -  This reply was modified 9 years, 8 months ago by [ka2](https://wordpress.org/support/users/ka2/).
 *  Thread Starter [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/)
 * (@webmasterjgb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8200102)
 * Hi
 * the redirection has changed, but not to a point where the data gets updated. 
   this time it sends me to 404 error. Please take a look a the url in the image.
   
   [https://snag.gy/67wPyD.jpg](https://snag.gy/67wPyD.jpg)
 * i appreciate any help
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8200674)
 * I see. Thank you for reporting.
 * Please change code since the last time to following.
 *     ```
       function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){
         if ( is_admin() && $shortcode_name === "cdbt-edit" ) {
           $component_options['actionUrl'] = admin_url( str_replace( '/wp-admin', '', $component_options['actionUrl'] ) );
         }
         return $component_options;
       }
       add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );
       ```
   
 * I think probably your problem will resolve by this code.
 * Thank you,
 *  Thread Starter [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/)
 * (@webmasterjgb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8202307)
 * Hi!
 * Sadly the code generates an error in the whole website:
 * Fatal error: Cannot redeclare my_cdbt_shortcode_custom_component_options() (previously
   declared in C:\xampp\htdocs\inner\wp-content\plugins\custom-database-tables\functions.
   php:43) in C:\xampp\htdocs\inner\wp-content\themes\creative-blog-child\functions.
   php on line 19
 * Here is the code i used [https://snag.gy/GnNVD5.jpg](https://snag.gy/GnNVD5.jpg)
    -  This reply was modified 9 years, 7 months ago by [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/).
      Reason: screenshot
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8204562)
 * That error was for existing already the same function name in your functios.php.
   You should try to remove that code if functions.php has a code that added previous.
 *  Thread Starter [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/)
 * (@webmasterjgb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8207753)
 * it worked amazingly! this is agreat plugin. keep up the good work
 *  Thread Starter [webmasterjgb](https://wordpress.org/support/users/webmasterjgb/)
 * (@webmasterjgb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8271500)
 * awesome
 *  [astreck2](https://wordpress.org/support/users/astreck2/)
 * (@astreck2)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8623509)
 * Hi,
 * I was having the same issue in the backend and the code for functions.php file
   you provide fixed it. But how can I fix the 404 error on the front-end?
 * Thanks

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Update data redirection’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-database-tables_e4e2e2.svg)
 * [Custom DataBase Tables](https://wordpress.org/plugins/custom-database-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-database-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-database-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-database-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-database-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-database-tables/reviews/)

## Tags

 * [data update](https://wordpress.org/support/topic-tag/data-update/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 10 replies
 * 3 participants
 * Last reply from: [astreck2](https://wordpress.org/support/users/astreck2/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8623509)
 * Status: not resolved