• I’m still having weird Permalink problems – see thread here (https://www.ads-software.com/support/topic/whats-causing-categories-and-tag-links-go-to-error-404-page?replies=14#post-2783009) – which Esmi suggested had to do with the .htaccess file and that I should get in touch with my host, which I did but they were no use. Now, I’m not able to upload images to my site – getting html errors on crunching. I’ve looked around and, again, implications are that it’s to do with .htaccess file. So, I’ve gone into my FTP manager and located four .htaccess files. The code in each is below. If anyone knows about these things, could they say whether these files are where they should be and say the things they’re supposed to say. Any other suggestions as to my issues would be much appreciated. Thanks.

    1. html directory>.htaccess

    # 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

    2. db backups>.htaccess

    AuthType Basic
    AuthName "User Backups"
    AuthUserFile /home/content/03/9159303/html/stats/.statspwd
    require valid-user
    Options +Indexes

    3. current>.htaccess

    # 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

    4. WP admin>.htaccess

    # 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
Viewing 15 replies - 1 through 15 (of 27 total)
  • There should not be an htaccess file in https://yourdomain.com/wp-admin/

    What is the folder /current/ for? Do you have more than one WordPress installation in that same hosting account?

    If your WordPress site is installed in the root folder, the first htaccess file you listed is correct.

    the one in /db-backups/ is most likely for a backup plugin and should be correct.

    The one in /current/ is questionable. However if your URL’s on a WordPress install in the root folder don’t contain /current/ in the URL Apache should never be accessing that file in the /current/ folder anyway. If you have a second WP install in that folder that htacess doesn’t seem correct – the Rewrite Base would be different.

    What about your settings in the Dashboard – Settings – Permalinks section?
    What is your active Permalink structure?
    Do you have a Category Base or Tag Base set?
    Have you reset the Permalinks to “Default” and Save Changes, and then set them back to what you actually want them to be? That causes WP to recompute its internal URL redirection instructions.

    Thread Starter pushkin

    (@pushkin)

    Thanks for the detailed response. I’m going to pass on all this .htaccess file information – including your observations – to Go Daddy and ask them to investigate. Regarding Permalink settings, I’ve tried resetting, to no avail. I had set it up for Permalinks to work on Post name; but categories and tags go to error 404 page. Similarly, in numeric, default, day and name, month and name, categories and tags work, but posts go to error 404 page. The (unsatisfactory) solution I’ve come up with is to use Custom Structure and a mixture of Numeric and Post name – i.e. /archives/%postname%/. So my post URLs are now something like this:

    https://golovegreece.com/archives/aegina

    Tags read: https://golovegreece.com/archives/tag/aegina/

    Categories read: https://golovegreece.com/archives/category/cities/

    All add ‘archives’ to the Permalink; but at least no error pages. Naturally, I’d like to get links without ‘archives’.

    The category base and tag base fields are empty.

    what about the /current/ folder? why would there be an .htaccess file with the WordPress code in it in that folder? Is there another WP install in that folder? If not, how did it get there?

    Thread Starter pushkin

    (@pushkin)

    I’ve asked Go Daddy whether my .htaccess files are in the right place and say the right thing. I don’t know why there’s an .htaccess file in current folder or what it means if it is there. Are you suggesting I delete the current folder?

    To see what these files look like in FTP manager, I’ve made a couple of screenshots and uploaded them.

    https://i1171.photobucket.com/albums/r556/pushkin64/FTPdirectory1.png

    https://i1171.photobucket.com/albums/r556/pushkin64/FTPdirectory2.png

    The first screenshot shows FTP manager after opening.

    The second screenshot shows current in left hand column after opening.

    Does this look right?

    Current looks like a portion of a WordPress install. Could you have copied some WordPress files into another folder at some point?

    Just to be safe, I suggest you rename the .htaccess file in /current/ to something like .htaccess_save While its probably not causing the problem, it eliminates one potential source of a problem.

    getting html errors on crunching.

    What are the exact errors you are getting?

    all files from current directory move to root directory (html).
    Remove this htaccess from wp-admin catalog.

    Excellent advice Puskin. This helped me out as well.

    Thread Starter pushkin

    (@pushkin)

    Thanks for advice on what to do with .htaccess folder. I’ll try out these solutions later this evening.

    On getting HTML error on crunching images; what I mean is this. I upload an image via Media Library>Add New. It goes through process of uploading the image, getting to 100% and then when it’s time for it to be smushed (I have the plugin WP-Smush.it installed), I get an HTTP error at the top of the page and uploading fails to complete. I’ve tried deactivating the plug-in and while the image will load, when I try and reactivate the plugin and smush the image manually, I’ll get an error saying ‘operation timed out’ or ‘cannot find host’. Just to say, I’ve had the smush.it plugin installed for a while, smushed dozens of images with no problems – until now.

    1) Plugins that have been working fine for a while don’t just one day stop working when nothing has changed. Something has changed in your WordPress setup.

    2) The upload process works fine without the plugin. So what you are saying by this is you have a problem with the WP-Smush.it plugin, not with the WordPress upload.

    What is the EXACT HTTP error that you see at the top of the page?

    Is it possible smush.it is conflicting with another plugin? Can you disable all plugins but smush.it and see if you still have this problem? If it goes away, turn the others back on one at a time to find the one that conflicts.

    Thread Starter pushkin

    (@pushkin)

    I’ve just received the following reply from Go Daddy on .htaccess file:

    We cannot review the .htaccess files in their entirety. We can review to see if there is an issue with a particular portion, as in if it is a conflict on shared hosting. However, we cannot troubleshoot your .htaccess files in such a general fashion.

    In regard to the /current folder, this is not a folder that we created. It appears there were also recommendations made regarding this folder. The best method of troubleshooting this type of issue is to disable .htaccess files by renaming them to .htaccess.bak and see if this resolves the issue.

    In addition, it is sometimes helpful to find a default .htaccess file for your application online and upload this and then make the necessary adjustments, such as enabling permalinks. This will insure that you are starting with a ‘good’ .htaccess file.

    I think this ties in with advice received above from stvwlf and adpawl and will give it a go later this evening and report back. Thanks for help so far.

    Thread Starter pushkin

    (@pushkin)

    The exact error is a pink box at top of page in which it says HTTP Error, at which point the uploading process stops. I’ll try and see if smush.it is conflicting with another plugin, but I haven’t added any recently, so not sure that this is problem.

    You have to eliminate possibilities one at a time, as the source of problems can be many. Since you are having a problem with the plugin, possibility of other plugins conflicting exists. Since you say you haven’t added any plugins recently that is a less likely source of the problem.

    In terms of what adpawl said about moving contents of /current/ into the root folder – not enough files were visible in your screenshot to see what files are already in the root folder. I think it most likely that the files that are in /current/, which contains WP files that go in the root folder of a WP install, are ALREADY in the root folder. Otherwise your WP install wouldn’t work at all. You might just want to rename the /current/ folder to /current.bak/ also, to get it out of the way of any possible involvement in this issue.

    Why are all of those image files in your root folder? Are they supposed to be there?

    Go to Dashboard / Settings / Media – what is in the
    “Store uploads in this folder” field?

    Thread Starter pushkin

    (@pushkin)

    I’ve tried deactivating plugins in combination with smush.it and uploading images after, and sometimes images will complete processing correctly, sometimes they won’t. When I think I’ve identified a problematic plugin and turned it off, I’ll try uploading images again and the error message re-appears. It seems quite arbitrary.

    Don’t know how images got into root folder. I’ve just been uploading images as normal into my library, though as I’ve been developing the site I have uploaded a lot of images, maybe 200; though, currently, after some deletions, I’ve 92 images in my media library. There’s nothing in the ‘Store Uploads in the Folder’ field. It’s on default, which is wp-content/uploads

    As for messages I get when processing images fails, I notice that apart from the HTTP error on the uploads page, if I go into the media library and try and smush an image manually, the error message here reads:

    Could not find /home/content/03/9159303/html/wp-content/uploads/

    This is an important error message

    Could not find /home/content/03/9159303/html/wp-content/uploads/

    I suggest you pass on to GoDaddy that you are receiving that and ask why. (that suggestion assumes the above is the correct server file path to your uploads folder)

    Thread Starter pushkin

    (@pushkin)

    Thanks stvwlf. I’ll get in touch with them as you suggest.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Are Permalink and Image Upload issues connected to .htaccess?’ is closed to new replies.