1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with changing Permalinks in WordPress (.htaccess)

Discussion in 'White Hat SEO' started by Diviance, Aug 27, 2013.

  1. Diviance

    Diviance Regular Member

    Joined:
    Jan 21, 2012
    Messages:
    203
    Likes Received:
    46
    Hello everyone,

    I have a problem with changing the permalinks of a WordPress website of mine.
    When i want to change the permalinks structure in the Settings, i get a notification that i have to change my .htaccess file and add the following code.

    Code:
    <IfModule mod_rewrite.c>RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    
    
    But when i'm looking for the .htaccess file of my website in the FTP, i don't see a .htaccess file.
    When i create one, and add the code above, i get an error on the website, and site doesn't work anymore.

    Can someone please help me change the permalinks?

    Thanks!
     
  2. imm088

    imm088 Registered Member

    Joined:
    Dec 26, 2012
    Messages:
    88
    Likes Received:
    27
    hi i think i had the same problem
    you can try to give wp, apache user rights so wordpress update .htaccess itsself
    chown -R apache: /var/www/wordpress-site-path/
     
  3. Diviance

    Diviance Regular Member

    Joined:
    Jan 21, 2012
    Messages:
    203
    Likes Received:
    46
    Thanks for your reply!

    Do i have to 777 the path?
     
  4. Diviance

    Diviance Regular Member

    Joined:
    Jan 21, 2012
    Messages:
    203
    Likes Received:
    46
    Got it.

    Created a .htaccess file and put on the FTP of my website.
     
  5. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,062
    Likes Received:
    2,872
    Gender:
    Male
    That's due to improper group permissions in your server. You might not be able to upload pictures too for the same reason. TO fix this, login to your SSH client with sudo permission and type chown -Rv username:apache /path/to/www
    Apache group might be different depending on your server and it can sometimes be wwwroot or something else. Check the group first.
     
  6. Diviance

    Diviance Regular Member

    Joined:
    Jan 21, 2012
    Messages:
    203
    Likes Received:
    46
    Thanks for your reply!

    It was however already fixed. I created a .htaccess file and placed it in the root. I was able to upload pictures. Everything is fixed now :). Thanks again.