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 9196923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:57:26+00:00 2026-06-17T21:57:26+00:00

I made a little mistake (I started a new php call within an existing

  • 0

I made a little mistake (I started a new php call within an existing php call – oops) and managed to have google start crawling a whole bunch of urls that look like this:

http://www.mydomain.com/folder/parameter/%3C/?php%20echo%20writelink();%20?%3E

I’ve fixed the sourcing call, but my attempts to have .htaccess rewite the page calls to

http://www.mydomain.com/folder/parameter/

have been unsuccessful.

I have tried the following:

RewriteRule  ^folder/(.*)/(.*)%(.*) /folder/$1/ [NE,R=301,L]
RewriteRule  ^folder/(.*)/(.*)3C/?php /folder/$1/ [R=301,L]
RewriteRule  ^folder/(.*)/(.*)writelink /folder/$1/ [R=301,L]
RewriteRule  ^folder/(.*)/([^/.]+)writelink /folder/$1/ [R=301,L]

But all of them are returning the same 403.
I have the test rewriterule as the first rewriterule in the file, so it isnt being usurped by something else.

(For reference, the correct rewriterule when I havent mucked up the page is
RewriteRule ^folder/(.*)/$ /content/element.php?param=$1 [L]
)

I’ve had problems with %ages in the path before but this time I’ve decided to defeat it – any suggestions?

  • 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-06-17T21:57:27+00:00Added an answer on June 17, 2026 at 9:57 pm

    Your URL is something like this:

    http://www.mydomain.com/folder/parameter/</?php echo writelink(); ?> whithout the encoding.

    The 304 code does not really indicate an error, it indicates the resource for the requested URL has not changed since last accessed or cached. Clear your brower’s cache and make sure it is cleared.

    The error should be 403 (Forbidden) because of the initial character < (%3C).

    These errors make any rewrite rule at .htaccess useless. One way to handle this kind of problem is with a script.

    EXAMPLE

    Add these lines to your .htaccess file at root directory:

    Options +FollowSymlinks -MultiViews
    ErrorDocument 403 /Error403.php
    

    Create Error403.php at root directory with a content similar to this one:

    <?php
    // The following lines should be at the top of the file
    
    /**************Only for Debugging**********************/
    echo $_SERVER[ 'REDIRECT_QUERY_STRING' ] . "<br /><br />"; 
    echo var_dump($_REQUEST) . "<br /><br />";
    /*=====================================================
    NOTE: A Header error might be generated while the above 
    code is active. Use it only to display the incoming 
    parameters and delete it for normal operation.
    *******************************************************/
    
    if ( isset ( $_SERVER[ 'REDIRECT_QUERY_STRING' ] ) ) {
      $QueryString = $_SERVER[ 'REDIRECT_QUERY_STRING' ]; // The query looks like this: php%20echo%20writelink();%20?%3E 
    
       // Check if it is the wrong URL
      if ( preg_match( '|php%20echo%20writelink()|i', $QueryString ) ) {
      header("Location: http://www.mydomain.com/folder/parameter/");
      }
    }
       // Handle other errors
    ?>
    

    In this specific case we take advantage of the fact that the string contains a question mark ?, that makes it look like a query. So we try to match the query content with preg_match().

    That should do it. Modify the links accordingly if necessary, this is just an example on how to do it.

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

Sidebar

Related Questions

I need a little heads up on the mistake I have made on this
I have a PHP web application where I've made a little module system, that
I made a little PHP script that checks if an email is valid. The
I have made a YUI module a little like the code shown below, which
Im having a little trouble with a php script ive made. you can see
So... I have some little flash graphs I made that pull data from an
My team made the classic mistake wherein a new addition to the team made
I made a little mistake in one of my projects. I wrongly set JPA
I made a little script that send a textarea content to PHP page with
I've made a little function that sends data from two forms to a PHP

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.