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

  • SEARCH
  • Home
  • 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 4112028
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:08:30+00:00 2026-05-20T22:08:30+00:00

Dear folks, in order to remove some really crazy /%A/%E\%FD occuring in the urls

  • 0

Dear folks, in order to remove some really crazy /%A/%E\%FD occuring in the urls by freaking translation software, i am trying to seed some order into the url chaos:

$search   = array(' ',  ',',  '/',  '\',  'amp%3B',  '+',  '--',  '[',  ']');
$replace  = array('-',  '' ,  '' ,  '',   ''       ,  '' ,  '-' ,  '' ,  '' );

Worked fine untill I added the ‘\’ apparently thats a special char?!

Q1. First question: ERROR '\' How to I capture a single (one) \ ?

Q2. Neigher & or amp%3B or & capture and ampercant? what to do capture that from url?

Q3. Enhancement Sugestions? that I have forgotten to make this really timeless?
In other words: are there any other special chars in url that can break the logic like the ‘/’ which represents folder structures that I happily found out myself and removed, not allowed it to be in the url.

  • 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-20T22:08:31+00:00Added an answer on May 20, 2026 at 10:08 pm

    Does this help you??

    $string = '/var/www/vhosts/site.com/httpdocs/webpage-\xec\x8b\xa0\xeb\x85\x84-\xec\xb9\xb4\xeb\x93\x9c-\xed\x81\xac\xeb\xa6\xac\xec\x8a\xa4\xeb\xa7\x88\xec\x8a\xa4-\xec\xb9\xb4\xeb\x93    \x9c';
    
    $search   = array(' ',  ',',  '/',  '\\',  'amp%3B',  '+',  '--',  '[',  ']');
    
    $replace  = array('-',  '' ,  '' ,  '',   ''       ,  '' ,  '-' ,  '' ,  '' );
    
    $count=0;
    foreach($search as $sch)
    {
        $string =  str_replace($sch, $replace[$count], $string);
        $count++;
    }
    
    echo $string;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dear experts, I was trying to align an paragraph to the middle of an
Dear experts, I was trying to dynamically generate DOM elements using JS. I read
Dear Folk's i'm using the following code in order to send the bytes of
Dear Stackoverflowers, I am trying to build a simple web application in ASP.NET where
Dear stackoverflow members, I have a small problem, I want to replace some characters
Dear fellow developer, for some reason updates for 1720 records takes around 15 seconds
Dear g++ hackers, I have the following question. When some data of an object
Dear all. I need to keep some temporary information in code. When i access
Dear Scholars I am trying to parse a RSS feed with the following item
Dear folks, There seems to be a problem with password protection for accessing a

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.