• I recently developed a website:
    https://www.sivananda.org/camp/?page_id=17
    and whenever I change the permalinks I get 404 error.

    This website I created /camp is part of the main website: https://www.sivananda.org/

    I do not have access to the server so I can not give you details about it. But I can communicate the information with the server admin in case you need me to find out any details.

    Any help is appreciated in this matter. Please let me know if you need any other info.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You need to make sure you have .htaccess file in the root of the site with default content:

    # 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

    More info here

    Hope that helps.

    Hello Viktor
    Yes I have removed the htaccess file for wp to be able to create new one here is the content

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

    # END WordPress

    I’m assuming mod_rewrite is enabled on this server.

    The next 2 steps to troubleshoot this issue is:

    1. Try switching to a default theme and see if permalinks work. If they do, then something in your theme causes the issue. If they don’t, switch back to your theme and try step 2.

    2. You can either disable all plugins at once, to see if permalinks work and then enable them one by one to find plugin that’s causing the issue… or, you can disable plugins one by one until you find the one that’s causing the issue.

    I just fixed this on my apache2 on ubuntu.
    I did the following went to etc/apache2/apache2.conf

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>
    and change it to;

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>

    I used the following guide to fix it,
    https://stackoverflow.com/questions/18740419/how-to-set-allowoverride-all

    You must have to check the .htaccess file if it is writeable.
    If not writeable you must have to chmod this file.
    After chmod you still dont have write permission so you have to look at the own/group of this file and use chown command to change it to right group.
    It will request SSH access to do chown, or you have to contact the hosting manager to do it for you!

    I had to go to my apache2 httpd.conf file and enable
    “AllowOverRide All” for my directory
    and
    “chmod 775 dir” to allow writing the .htaccess file.

    Permalinks enabled now – yippee!

    Hi,

    I facing the same problem before and its already solved.

    What you can do is on Permalinks, insert this code on Custom Structure: /index.php/%year%/%monthnum%/%day%/%postname%/

    good luck.

    Facebook: https://www.facebook.com/nuzulnazera

    kakashi-hatake

    (@kakashi-hatake)

    Thanks Viktor your answer is working ??

    Many thank Tajaykool28. I fixed the bug follow your guide.

    Thanks Viktor.
    I had to enable mod_rewrite by uncommenting from httpd.conf (apache)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Permalinks not working correctly’ is closed to new replies.