• [ 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?

Viewing 1 replies (of 1 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    We have a Microsoft affiliated WordPress site which on working on the domain re-direction (with Microsoft) requires the use of relative URLs.

    Don’t use relative URLs. ??

    It’s an old discussion but the short version is that WordPress is designed and uses absolute URL in many places. For example, using relative URLs will mean that all of your RSS links and references for images will be wrong and invalid.

    What is the situation that requires relative URLs? Perhaps there is a supportable way to accomplish what you are trying to do.

Viewing 1 replies (of 1 total)
  • The topic ‘Using Relative URLs with WordPress – 405 error on login’ is closed to new replies.