Using Relative URLs with WordPress – 405 error on login
-
[ Moderator note: moved to How-to and Troubleshooting. ]
We have a Microsoft affiliated WordPress site which on working on the domain re-direction (with Microsoft) requires the use of relative URLs. This meant we needed change the main site & home url to relative so that all the theme dependent source URLs were relative, including css, javascript files and images.
This is the test site:
https://example.com/en-us/musicxtech/
Here is the code changed in web-config.php file:
define(‘WP_HOME’,’/en-us/musicxtech’);
define(‘WP_SITEURL’,’/en-us/musicxtech’);After doing this the site front end is running fine except for some plugins requiring Absolute URLs which can be solved with hard-coding particular plugins.
ADDING IN: Site front-end also throwing “Notices” all over the place.
However the site back-end on logging in throws a 405 error:
“405 – HTTP verb used to access this page is not allowed.
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.”This seems to be the error by web server which in our case is IIS.
Is anyone able to assist?
- The topic ‘Using Relative URLs with WordPress – 405 error on login’ is closed to new replies.