GET to admin.php not supported error

Status
Not open for further replies.

Alex Felga

New Member
Messages
3
Reaction score
0
Points
1


Not Implemented

GET to /wp-admin/admin.php not supported.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
-----------------------------------------------------------------

I get this error page today when I am going to edit a post in a plugin.

I try to create a new one with the same content, but it get the same error.

Is there anyway to solve it ?

Thank you
 

Alex Felga

New Member
Messages
3
Reaction score
0
Points
1
The error comes from a js code I use to get part of an url.
 
Last edited:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi Alex,

There is currently no hosting account linked to your forum account. Please could you post from the associated forum account, by going to "Support" in the top right of cPanel? :)

Thank you,
 

Alex Felga

New Member
Messages
3
Reaction score
0
Points
1
Hi, I use the cpanel as you said.

I changed the js code for a php code, so I have no error now.

Anyway, I would like to know why the error page happens, but as I said, I have no problem now.

Thank you.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi Alex,

I'm still not seeing a hosting account attached to your forum account. Please could you provide me with a link to your website, or something I can use to identify your account? :)

Thank you,
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi Alex,

It appears that the Not Implemented error message is being sent by mod_security. This is because the data you were submitting looked suspicious.

If this is a false-positive, please could you provide me with the data you were submitting? :)

Thank you,
 

adh3d_417

New Member
Messages
14
Reaction score
0
Points
1
Hi, It is just a js that get a variable from the url and then, according to the value, the id of the page, print to the page a variable.

The error was in the part that get the value from the page url, because if I delete that part, everything goes right.

Anyway, as I said before, I change that code for a PHP one, so now the problem is solved.


This isthe part of the js that cause the error page :

<script>

function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}

var pg_id = getUrlVars()["page_id"];

.....
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
The problem there was that you were working directly on window.location.href rather than on the string it represents, so your function was trying to issue a GET request containing JavaScript. If you want, you can re-implement your JavaScript if you remember to create a string containing the string that represents the href and then work on that:

Code:
var currentLocation = window.location.href;
var parts = currentLocation.replace(...);
 

adh3d_417

New Member
Messages
14
Reaction score
0
Points
1
I see, thank you for the information. Anyway, I will go with the php option, but It is good to know it.
 

adh3d_417

New Member
Messages
14
Reaction score
0
Points
1
I see, thank you for the information. Anyway, I will go with the php option, but It is good to know it.
 
Status
Not open for further replies.
Top