• Resolved scafidi454

    (@scafidi454)


    Hi,

    I’ve been having this issue for several years. I run a multi-site setup, and?HTTP Strict Transport Security?as of about a month ago, but the multi-site with standard encryption was used since 2016.

    Whenever I try to go to ~/pageid – It redirects to the homepage. Whenver I put in ~/pageid/subpageid, it loads directly.

    All of the ~/pageids are top-level menu items, but they do exist with content/pages. So, I’m not sure what’s going on.

    I thought about setting up no click top level menu items, but I would rather not.

    I have tried several approaches to the .htaccess.

    Here’s what I have and just tried again today; neither work:

    This is the “working” one:
    https://pastebin.com/U65gHkDk

    Proposed new implementation according to guides below. This one was preventing some wp-admin dashboard issues, but there are some directives that might need to be adjusted.
    https://pastebin.com/6B5RQ3K4

    https://wpmudev.com/blog/htaccess/

    Loginizer Pro doesn’t recognize the loginizer directives in the .htaccess to setup more strict controls.

    Additional info: When I started my hosting account, I was using another domain: mytechsolutions.net – When I created this site, it got listed as turnkeymsp.mytechsolutions.net, but it always redirects to turnkeymsp.net or doesn’t at all. So, I’m not sure if that’s part of the issue.

    With regard to the wp multi user directives, I have sites that are subdomains, but the turnkeymsp.net is setup with sub-directories for pages and content. So, I’m using that one. I tried both subdir and subdomain directives, but no change.

    One time, I was getting direct URLs to load, but not all.

    What I’m trying to achieve?

    I want to be able to send someone a direct link (i.e. turnkeymsp.net/about, turnkeymsp.net/product/productID, etc.), and it load up directly without having to type it in the address bar after loading, search, or go through the menu. It’s probably affecting my indexing too.

    I don’t usually reach out for help much; it’s been 8 years on this site, probably time!

    Thanks in advance!
    – Tyler

    • This topic was modified 3 months, 3 weeks ago by James Huff. Reason: moved to Networking WordPress, since this is a multisite issue

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I can call up all the pages that are in the main menu without any problems. Have you already solved the problem? Have you cleared your browser cache?

    I also don’t know what you mean by your example /product/productID. I can’t find a /product/-URL anywhere, nor is it accessible.

    Thread Starter scafidi454

    (@scafidi454)

    Threadi,

    I got it worked out; really simple actually. Thankfully, I found it on a RedHat forum:
    https://www.redhat.com/sysadmin/beginners-guide-redirects-htaccess

    The URL structure I was referring to is similar to this one:
    https://www.turnkeymsp.net/product/chromebook-2-8gb-mercury-gray/

    The issue was being able to go directly to a link like that without it redirecting to the homepage, but the above fix worked.

    I had to amend my .htaccess redirects from:

    Redirect to HTTPS (301 – permanent)
    RewriteEngine On
    RewriteCond %{HTTP_HOST}
    RewriteCond %{HTTPS} !=on RewriteRule . https://www.turnkeymsp.net%{REQUEST_URI} [R=301,L]

    To:

    Redirect to HTTPS (301 – permanent)
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www.(.)$ [OR,NC]
    RewriteCond %{HTTPS} !=on RewriteRule . https://www.turnkeymsp.net%{REQUEST_URI} [R=301,L]

    Once I saw that extra “!^www.(.)$ [OR,NC]” directive, I knew it was what I needed. All my sites started working properly again!

    I had it setup before, but lost it a long time ago. Gotta love breaking your site!

    Thank you for your response!
    (WARNING: MARKETING BELOW!)

    • This reply was modified 3 months, 2 weeks ago by Jan Dembowski.
    • This reply was modified 3 months, 2 weeks ago by Steven Stern (sterndata). Reason: removed long bit of resume (see notes)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.