• i’v searched/troubleshooted for hours and cannot seem to make this work.

    I’m trying to set up a custom permalink structure and it keeps telling me:

    “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.”

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    I have edited the htaccess to include that code.
    I have re-uploaded it to my server.
    I have set the permissions in dreamweaver (remote files window)

    Does anyone know what I’m doing wrong? Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • What problem are you experiencing?

    If your .htaccess file were writable, we could do this automatically, but it isn’t so

    chmod your .htaccess file to 666. Let WordPress refresh/rewrite your permalinks. You should see a confirmation message this time. Change it (.htaccess permissions) back to 644, and see if your troubles still persist.

    Thread Starter iluvpinkerton

    (@iluvpinkerton)

    my problem is that the links do not work when I change the permalinks from default to a custom setting because the “.htaccess file is not writable.”

    i tried changing the permissions to 666, then 644, then practicially every other combination I could think of.

    Does anyone know what im doing wrong?

    In file view, you should be able to right click on the file, then set permissions and change it to 644. But this will not work on all servers. If not follow instructions below.

    In DW, go to the local copy of .htaccess, right click on it and then on open with DW. Make your changes and click on the up/down arrows in the menu bar to “put” the file on the server. (Not sure which version you have but it should work something like this if you have DW set up to manage your site.)

    If all you have is the remote site view, right click on the file and then on preview in browser. Select and copy text, open new file in DW (basic page), select and delete the few lines there and paste the htaccess code into the new page. Make your changes (carefully). Save as .htaccess and then move to the server.

    Thread Starter iluvpinkerton

    (@iluvpinkerton)

    I have already edited the file and re-uploaded a million times. I have changed the file permissions through Dreamweaver and through the server Cpanel but when I try to change the permalink structure, I still get the message that the .htaccess file is not writable.

    also, I get this error:

    Not Found

    The requested URL /blog/about/ was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    URL? And I don’t think the errors are related. Your htaccess does not have to be writable just as long as you copy the message when you change permalinks and use it as your htaccess. Sounds like you tried that.

    Thread Starter iluvpinkerton

    (@iluvpinkerton)

    yeah I tried that. I tried changing the permalink structure and then when I go to view a page, it says “The requested URL /blog/about/ was not found on this server.” I do not know why that is happening since I have changed the .htaccess to include the code that it tells me to add.

    Here is the blog I’m working on:

    http://www.rockabyebabymusic.com/blog

    While you’re there, can you possibly tell me why the “test” links under “Recent Posts” are not working? They seem to only work when I place the div higher.

    Thanks!

    I get to http://www.rockabyebabymusic.com/blog/?page_id=23 by clicking on about.

    You can post short code here so paste your htaccess here as it is.
    Also tell me what permalink structure you require.

    You can validate your errors here, http://validator.w3.org/check?uri=www.rockabyebabymusic.com%2Fblog&charset=%28detect+automatically%29&doctype=Inline&group=0 and then correct them in DW by bringing up the appropriate file.

    Thread Starter iluvpinkerton

    (@iluvpinkerton)

    my .htaccess:

    # protect the htaccess file
    <files .htaccess>
    order allow,deny
    deny from all
    </files>
    
    # disable the server signature
    ServerSignature Off
    
    # limit file uploads to 10mb
    LimitRequestBody 10240000
    
    # protect wpconfig.php
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>
    
    #who has access who doesnt
    order allow,deny
    #deny from 000.000.000.000
    allow from all
    
    #custom error docs
    ErrorDocument 404 /404.php
    
    # disable directory browsing
    Options All -Indexes
    
    #redirect old to new
    Redirect 301 /old.php http://www.yourdomain.com/new.php
    
    #block referring domains
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} digg\.com [NC]
    RewriteRule .* - [F]
    
    #disable hotlinking of images with forbidden or custom image option
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
    #RewriteRule \.(gif|jpg)$ - [F]
    #RewriteRule \.(gif|jpg)$ http://www.yourdomain.com/stealingisbad.gif [R,L]
    
    # php compression - use with caution
    <ifmodule mod_php4.c>
    php_value zlib.output_compression 16386
    </ifmodule>
    
    # set the canonical url
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
    
    # protect from spam comments
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
    RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    I’m trying to change the permalink structure to day and name:
    http://www.rockabyebabymusic.com/blog/2009/02/19/sample-post/

    The permalink change to the htaccess is fine.

    Rename the .htaccess file you have local something . . . test.txt or whatever. Either thru DW or C-panel FTP upload this file to the server.
    Confirm it is there. Delete the old .htaccess. Rename the new file .htaccess.

    BTW, this may be why you cannot change it

    # protect the htaccess file
    <files .htaccess>
    order allow,deny
    deny from all
    </files>

    If you permissions are set correctly you do not need to protect any file. Hot linking should be controllable from c-panel. The htaccess file is very powerful. I try to keep it a simple as possible because changes in it can make your blog unworkable.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘.htaccess /changing permissions in dreamweaver’ is closed to new replies.