Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

404 not found , the requested URL <<url name>> not found on this server in wordpress

I recently installed wordpress , I am facing issues when I try to change the permalinks format ,

when I change the permalink from default to day and time

 Default    http://127.0.0.1/?p=123
 Day and name   http://127.0.0.1/2015/03/16/sample-post/ 

the link generated does't working , it gives the same error 404 all the time ,

 The requested URL /2015/03/16/post-5-problem/ was not found on this server.

But when the permalink type was default this works perfectly.

I found some solutions which are

sudo a2enmod rewrite

Module rewrite already enabled

Another solution is to change the mode permissions of .htaccess file to 666(giving write permission to wordpress of .htaccess file) before change the permalink from default to some other type ,

sudo chmod 666 /address_of_.htaccess 

i checked the .htaccess file

# 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

but the above seems to be correct , the above included by the wordpress itself

Both the solutions does't seem to work , is there any other thing do I have to change to enable the permalink options ?

like image 371
Siva Kannan Avatar asked Mar 16 '15 10:03

Siva Kannan


People also ask

How do you fix not found the requested URL was not found on this server?

You may receive a 404 error because the page did not load properly. Refreshing or reloading the webpage may fix the issue. You may refresh the page by clicking the refresh button at the top of your web browser or pressing the F5 button on your keyboard.

How do you fix it WordPress 404 Not Found Cannot login admin page?

The easiest way to fix this is to update your permalink settings through the WordPress dashboard. All you need to do is go to Settings → Permalinks and click Save Changes (you don't need to make any changes – clicking Save Changes is enough).


1 Answers

If it is a fresh install of web server it is possible that .htaccess rules are not allowed by default. To fix that, edit you httpd.conf (usually it is in /etc/apache2), find

<Directory "path/to/your/document/root">    
    # ....

     AllowOverride None

    # ....

</Directory>

and change

AllowOverride None

to

AllowOverride All

Then restart your web server and try again.

like image 139
Aleksandar Jakovljevic Avatar answered Oct 12 '22 02:10

Aleksandar Jakovljevic