• Resolved mosca64

    (@mosca64)


    I am trying to change to a custom permalink setting. I get a message saying:

    If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

    The code I have to add is:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    I’m using the latest version of Filezilla and I can’t find the .htaccess file.
    1. How do I find it?
    2. How do I add that code to it?
    Thanks in advance
    Lewis

Viewing 7 replies - 1 through 7 (of 7 total)
  • you need to be able to see invisible files.

    if you haven’t added a htaccess file yourself already – just open up a text editor, paste that code in there and save it as htaccess.

    then upload it to your root directory and then add the ‘.’ before the htaccess.

    it should disappear then if you can’t see invisible files on your ftp server.

    Thread Starter mosca64

    (@mosca64)

    Not sure what’s changed but I can see a .htaccess file in public_html now. Won’t it be best if I add the code into that file? If so how do I do that? (or should I delete it and follow your previous instructions?)
    Really appreciate your help thanks.
    Lewis

    Depends what’s in ity, have you taken a peep? It could be pretty much empty and you can just add the above code

    Thread Starter mosca64

    (@mosca64)

    Had a ‘peep’ and it did have some text/code inside. I tried adding the code and loading it back up but nothing has changed. I also made the same change to another WP installation with the same issue arising.
    Help needed!
    Thanks

    Are you saving the changes? Make the change, close the file, and a message should automatically give you the option to upload/send the changes, select Yes (or whatever you see that is equivalent to yes), and you should be good to go.

    Sounds(reads?) like you’re opening the file, making the changes, but not actually saving the changes.

    If that’s not the case, delete the file, create a file, call it anything you like, plonk that code in it, save it, upload to the server, then rename the file to .htaccess once it’s on the server (avoids any naming issues, windows for example won’t allow that file name).

    Thread Starter mosca64

    (@mosca64)

    Hi Guys,
    Thanks for the input. I managed to find a very helpful post here:
    http://wordpress.org/support/topic/341668?replies=4

    I was initially adding the code to the .htaccess file but that didn’t work. I then deleted the code already in the file and added the code suggested in the above link:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} ^wp-content.*
    RewriteCond %{REQUEST_FILENAME} ^wp-admin.*
    RewriteCond %{REQUEST_FILENAME} ^wp-include.*
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Still didn’t work until I realized I had to change file permissions to 666. Once I did that everything worked. I hope I haven’t stuffed something else up in the process!

    Glad to hear it’s all working.. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I add code to htaccess file?’ is closed to new replies.