# URLResolver failing to find pattern match for admin POST request - cPanel/Apache

**URL:** <https://forum.djangoproject.com/t/urlresolver-failing-to-find-pattern-match-for-admin-post-request-cpanel-apache/3425>\
**Category:** Using Django\
**Created:** [July 14, 2020, 3:17pm UTC](https://forum.djangoproject.com/t/urlresolver-failing-to-find-pattern-match-for-admin-post-request-cpanel-apache/3425 "2020-07-14T15:17:24Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![alstr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alstr/32/1650_2.png) [@alstr](https://forum.djangoproject.com/u/alstr)\
**Post date:** [July 16, 2020, 12:50pm UTC](https://forum.djangoproject.com/t/urlresolver-failing-to-find-pattern-match-for-admin-post-request-cpanel-apache/3425/12 "2020-07-16T12:50:23Z")

</div>

I have not solved this problem, but I have developed a workaround.

1. Edit `_get_response(self, request)` in `django.core.handlers.base`. Change `resolver_match = resolver.resolve(request.path_info)` to `resolver_match = resolver.resolve(request.path)`.

2. Add this middleware (adjust to your exact needs):

I have tested and this works with admin forms with ImageFields. Uploaded an image without issue.

Editing `base.py` isn’t ideal by any means but this is the least invasive solution I have found (indeed, the only thing that works). I don’t think using `request.path` instead of `request.path_info` will make a difference in my case, but other projects may not be able to do that.

It’s a horrible workaround, but it’s all I’ve got at the moment. Any thoughts in the absence of other solutions?

---

_[View the full topic](https://forum.djangoproject.com/t/urlresolver-failing-to-find-pattern-match-for-admin-post-request-cpanel-apache/3425)._
