• This
    newstr=”submenu.php”;
    $(‘#content’).load(newstr);
    works just fine with default permalinks

    When I switch to %postname% it does not work any more

    I can go though to mysite.com/submenu.php and it loads just fine

    Did I miss something here?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Javascript is not aware of permalink structure, because it is a client-side language. That behavior causes relative URLs to potentially break when permalinks are in use. You’ll want to load submenu.php with an absolute URL instead. e.g.,

    /full/path/to/submenu.php
    or
    https://mysite.com/full/path/to/submenu.php

    The important thing here is that you start with a “/” from the root directory.

    Thread Starter milosp

    (@milosp)

    I tried both with also no luck.
    Strange thing is that in firebug I get error

    GET https://localhost/wordpress/submenu.php 404 Not Found 210ms
    but when I click it there (response) file opens correctly
    Same is also online

    .htaccess is the one WP created after I erased it (the one at https://codex.www.ads-software.com/Using_Permalinks). Maybe there is problem?

    Thread Starter milosp

    (@milosp)

    I ended up using /index.php/%postname%/ since I had no success modifying htaccess. Almost pretty links work without problem. If anyone comes up with solution, please let me know.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can not call .php files after switching to %postname%’ is closed to new replies.