Title: Useless
Last modified: May 21, 2021

---

# Useless

 *  [amihaita](https://wordpress.org/support/users/amihaita/)
 * (@amihaita)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/useless-443/)
 * Not working on already saved post so for me is useless.

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

 *  Plugin Author [intuitart](https://wordpress.org/support/users/intuitart/)
 * (@intuitart)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/useless-443/#post-14466631)
 * Are you trying to display a different url than what was saved? You can do that.
 * Or are you wanting it to go through the database and remove absolute urls? The
   absolute part of a url is removed when it is saved, and at this time there is
   no batch process to do that retroactively. You would have to edit and re-save
   a post to remove urls.
 *  Thread Starter [amihaita](https://wordpress.org/support/users/amihaita/)
 * (@amihaita)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/useless-443/#post-14469695)
 * I am trying to transform all my absolute URL’s in relative URL’s, because now
   I’m testing a site and several people should see it, some from inside the network
   and others from outside and displaying images is a total mess. I thought to a
   VPN for those that are outside, but it is too complicate for them to use it.
   
   So the single acceptable solution for me is transform all the absolute paths 
   to relative. Just some of the paths I didn’t find where are saved, so I thought
   that with your module could solve the problem.
 *  Plugin Author [intuitart](https://wordpress.org/support/users/intuitart/)
 * (@intuitart)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/useless-443/#post-14472527)
 * To accomplish this you have two things to deal with.
 * First, I assume those accessing the site from outside have a different URL than
   the ones accessing the site from inside. You can deal with this by adding two
   lines to wp-config.php. This tells WP, and this plugin, to use the URL accessing
   the site as the site and wordpress URLs.
 *     ```
       define( 'WP_SITEURL', $_SERVER['REQUEST_SCHEME'] . '://'. $_SERVER['HTTP_HOST'] );
       define( 'WP_HOME', $_SERVER['REQUEST_SCHEME'] . '://'. $_SERVER['HTTP_HOST'] );
       ```
   
 * Second, you want existing posts to have relative URLs so they display properly
   both inside and outside the organization. There are a couple of ways of handling
   this. If there are only a few posts at the moment, just enable this plugin, edit
   and re-save each post. This will convert the URLs to relative. The second option
   is to use the related_sites filter in functions.php so that the plugin treats
   specific URLs as though they are relative.
 *     ```
       add_filter( 'of_absolute_relative_urls_related_sites',
           function( $related_sites ) {
               $related_sites[] = "http://originalsite.org";
               return $related_sites;
           }
       );
       ```
   
 * Replace originalsite.org with your own domain.
 * Hope this helps,
 * Andrew P.

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

The topic ‘Useless’ is closed to new replies.

 * ![](https://ps.w.org/absolute-relative-urls/assets/icon-256x256.png?rev=1568847)
 * [Absolute Relative URLs](https://wordpress.org/plugins/absolute-relative-urls/)
 * [Support Threads](https://wordpress.org/support/plugin/absolute-relative-urls/)
 * [Active Topics](https://wordpress.org/support/plugin/absolute-relative-urls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/absolute-relative-urls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/absolute-relative-urls/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [intuitart](https://wordpress.org/support/users/intuitart/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/useless-443/#post-14472527)