Announcement

Collapse
No announcement yet.

After 4.1 to 5.3 upgrade, URLs in HTML source not going to correct directory.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • After 4.1 to 5.3 upgrade, URLs in HTML source not going to correct directory.

    I copied my v4 database, created a new directory for my v5 test and I successfully ran the upgrade script via command line.

    My v5 site is now up here:

    mysite.com/test/

    Everything appears to be working but the URLs in the HTML source are all going to mysite.com instead of mysite.com/test/. And thus the CSS isn't loading, code generated URLs(as opposed to user generated URLs) are going back to mysite.com instead of mysite.com/test/ and forms are submitting to mysite.com instead of mysite.com/test/.

    For example, on the home page:

    mysite.com/test/

    the CSS URL in the HTML source is:

    href="css.php?styleid=8..."

    when I hover over that URL I see this in the bottom left popup:

    mysite.com/css.php?styleid=8...

    when I would expect to see:

    mysite.com/test/css.php?styleid=8...

    Furthermore, I setup a test in a different directory to test this "no leading slash" URL functionality. In:

    mysite.com/test2/index.html

    I have:

    <a href="test.html">test</a>

    and that link correctly goes to:

    mysite.com/test2/test.html

    So this weird "no leading slash" URL behavior is only happening in my v5 mysite.com/test/ directory.

    What's causing this?

    I tried removing the main .htaccess file completely, no effect.

    I tried setting the Rewritebase in the main .htaccess to /test/, no effect.

    I removed the web.config since I'm on Apache, no effect.

    Edit:

    I also changed the license URL from "mysite.com" to "www.mysite.com/test/" and that didn't seem to have any effect. Do I need to clear a cache or re-download something when I do this?

    One other thing, I have my mysite.com/test/ directory password protected via .htaccess/.htpasswd so that the duplicate content doesn't impact our SEO. I tried removing the password protect momentarily but it had no effect.
    Last edited by ry1234; Sun 11th Feb '18, 4:28pm.

  • #2
    You should update the 3 URLs in AdminCP > Settings > Site Name / URL / Contact Details

    AutoLinker-vB5+vBCloud | Topic Starter Ribbon | Blur Replies for Guests | NavMenu Dropdown-vB5+vBCloud | TimedSticky | Events Module | Moderator List | Drag/Drop Upload

    Comment


    • #3
      Thank you. I currently can't get into my admincp. So I set them manually. I had to set frontendurl and frontendurl_login in the setting database table.

      Comment


      • #4
        If you updated the URL directly in the database, you also have to delete records in the datastore table.

        Code:
        update setting set value = 'http://mysite.com' where varname='frontendurl';
        update setting set value = 'http://mysite.com' where varname='frontendurl_login';
        update setting set value = 'http://mysite.com/core' where varname='bburl';
        delete from datastore where title in ('options', 'publicoptions', 'miscoptions');

        AutoLinker-vB5+vBCloud | Topic Starter Ribbon | Blur Replies for Guests | NavMenu Dropdown-vB5+vBCloud | TimedSticky | Events Module | Moderator List | Drag/Drop Upload

        Comment


        • #5
          I previously set the bburl as well.

          Why do I need to delete from the datastore table?

          Comment


          • ry1234
            ry1234 commented
            Editing a comment
            I updated the cache using tools.php.

          • Mark.B
            Mark.B commented
            Editing a comment
            If it is still not working you will need to do what Glenn suggested.

          • ry1234
            ry1234 commented
            Editing a comment
            It's working. Just wanted to share my solution. Although I have many other issues as you can see with my other recent topics.
        Working...
        X