• Hey all,

    I apologize is this has been answered elsewhere. I’m having a problem with links, running the Twenty Sixteen theme on my site LibrarianOwl.com. In particular it appears on the Demos page, where I have links to a variety of artifacts. When someone clicks on the icon, they should be taken to a page where they can interact with that artifact. However, currently they can’t ‘there’s nothing there’ error message.

    I’ve dug into it a little bit, and checked that my links are pointing to the right place (they are). Furthermore, if I copy and paste the links into a browser I get the same error, UNLESS I am linking to one of the images that are part of each artifact. Those files load fine, but all other files return an error message.

    I’m not sure how long this problem has persisted, as the last time I check those links (4 – 6 months ago) they were working fine.

    Any and all help would be appreciated.

    Thanks in advance.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You have embedded blanks in the URLs:

    https://librarianowl.com/Mock%20School%20Website/index.html

    which get encoded as %20.

    What is the correct URL?

    Thread Starter librarianowl

    (@librarianowl)

    Hey
    The folders are named with blanks. Which is bad practice, and on my list of things to change. I actually thought that could be the issue, but even for links that don’t have blanks (like for the pineapple demo) https://librarianowl.com/PineappleDemo/story.html I get the same error.

    • This reply was modified 6 years, 3 months ago by librarianowl.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You’ll need to exclude those directories from routing through WordPress. See
    https://stackoverflow.com/questions/5754548/non-wordpress-files-in-wordpress-installation-directory

    Thread Starter librarianowl

    (@librarianowl)

    Hi,

    I tried following the directions there and got a website 500 error. Without the code they recommend adding from that link, here is my current .hpaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .*.html?$ index.php [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .*.html?$ index.php [L]
    RewriteRule home-site-map.xml index.php?hpsitemap [L]
    RewriteRule sitemap([0-9]+)?.xml index.php?sitemap=$1 [L]
    RewriteRule robots.txt index.php?xx=robots [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>
    # Use PHP5.6 as default
    AddHandler application/x-httpd-php56 .php
    
    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    Thread Starter librarianowl

    (@librarianowl)

    Hi Steve,

    Just wanted to let you know that I have resolved this problem. Once you directed me towards excluding those directories, I found success adding a .htaccess file to each subdirectory with only the following text in them:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /subdirectoryname/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /subdirectoryname/index.php [L]
    </IfModule>

    Once I placed one in each directory, and put the directory names in for ‘subdirectoryname’ everything worked fine. Do you foresee any problems with this approach?

    Thanks for all your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Weird link problem’ is closed to new replies.