Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 225667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:26:09+00:00 2026-05-11T19:26:09+00:00

I have a WordPress blog and several authors. I want to auto remove some

  • 0

I have a WordPress blog and several authors. I want to auto remove some website urls from my blog content. For example, I don’t want ANY myspace urls in post content, not only myspace.com than myspace.com/whatever or myspace.com/faq.html.

Is that possible to do that with some php code or adding some code to the .htaccess file?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:26:10+00:00Added an answer on May 11, 2026 at 7:26 pm

    .htaccess can’t help you here.

    You should be able to throw together a pretty basic plugin, something like this:

    add_filter('the_content', 'myspace_url_filter', 999);
    
    function myspace_url_filter($content) {
      return preg_replace('/(<a[^>]href=["'])[^"']+myspace.com[^"']+["']/', '\1#"', $content);
    }
    

    Note that this is by no means a perfect regex; it can trivially be evaded by replacing the myspace domain name with a myspace IP (good luck tracking down every public IP they use…), common XSS techniques, the use of any URL redirection service like tinyURL (to catch this, you’d have to follow every single link, and any redirects), or simply linking to a page which contains the link in question (e.g. a tinyURL preview page).

    Long story short, any technical countermeasure you can devise can be easily defeated, and addressing even the simplest workarounds can require extremely complicated work on your part.

    It might be simpler just to talk to your authors, make your desires clear, and discipline any author who refuses to obey your “no myspace links” rule.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have wordpress blog in my custom built website, i am displaying some posts
I have a wordpress blog and don't want others to visit it. So I
I have a WordPress blog with numerous URL's I wish to replace from this:
I have a wordpress blog www.freelancing4arab.com, I want to change the theme font, I
I have a (Wordpress) blog and some of my older posts have a character
I have a WordPress blog with a forum, and I ONLY want Guests (unregistered
I have a wordpress blog.I Want to add Facebook like Button &Facebook Share button
Hey I have a wordpress blog, and I need to add some negative margin
I have an idea for my wordpress blog. I want to have a page
I have transferred my WordPress blog from Godaddy to my own personal server and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.