Requested URL was not found on this server - php

We using server centos. Running my site, currently working home page itself, rest of page not working. Please help me
File Path
/var/www/html
Not Found
The requested URL /about-us/ was not found on this server. this error coming out.
.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

You can login in wp-admin backend with credentials Administrator.
You need to be sure that the .htaccess file is editable
So, go in Settings -> Permalink, and refresh this (save without edit anything).
Another test:
I suggest return your permalink to default ( /?p=ID ) so you ensure that .htaccess is the problem.

Related

wordpress links let me 404 not found

update
When the permalinks is postname that would be not found , without index.php in url.
add .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I'm the beginner to wordpress. Problem was happened that my website is not found when the permalinks setting is turned to postname.
Home page is still alive , but click on other links, it couldn't find the right page and show me the 404 not found(not from the wordpress default 404, it's apache2 back)
Remove index.php on my url was my first goal . Despite I tried to modified .htaccess or restart apache2 , it didn't work.
Currently , I set back the struct to index.php/%post_id%/%postname% and it would work .
How should I do in my terminal or modified something in my wordpress folder?

wordpress redirecting all pages to homepage

I have a wordpress website www.spiderhost.asia, when i click on any link on the website it's redirecting to the homepage which I don't want, it was working perfectly few days back and I didn't change any config and anything in website , still it's not working properly.
I contacted server admin, wordpress admin regarding same but didn't find any solution for that.
Even I didn't make anychanges to htaccess
# 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
I need help resolving this
That htaccess file is saying that if the file or directory being queried does not exist and it is not index.php, then reroute to index.php. Make sure that the file you're trying to query exists (and that it's in the correct directory).

Wordpress Permalink Issue with index.php

Why is this sample domain www.example.com/about-us is not working even though I activate the .htaccess
AddHandler php-stable .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
also when you navigate also this link www.example.com/index.php/about-us it will redirect you to this www.example.com/about-us which is not working but when you navigate this www.example.com/Index.php/about-us that's the time the url is working. Please help. It host on godaddy
Seems like you are having a mod_rewrite issue with your hosting. You can create a .php page on your server lets call it phpinfo.php and write the following code in it
<?php
phpinfo();
?>
Open this page in browser and look for mod_rewrite setting. It needs to be on for permalink to work.
Now, go to your WP Admin Panel -> Settings -> Permalink and choose /post_name/ Wordpress will automatically write in .htaccess file (provided it can access it).
If mod_rewrite is not enabled on your server, there is no way other than contacting your hosting provider to enable it. It is enabled by all hosting providers still you have to cross check using phpinfo.
Following is a perfectly valid .htaccess file for WordPress
# 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
Also ensure that apache.conf is configured to be overridden by .htaccess file. Apache settings like AllowOverride none; ensure .htaccess is not honored.
As per the query you explained, I would like to suggest that you
go to WP Admin Panel -> Settings -> Permalink
Then select the radio button in front of /post_name/
Then go to WP Admin Panel -> Appearance -> Menus
Now check that you have all pages used in Menus, or is there any custom link you have used?
Also check your .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>
# END WordPress

htaccess/Permalink issue with Wordpress

I'm facing an issue with Permalink for Wordpress site that I have hosted on ubuntu server. Whenever I save the permalink setting I receive an error to modify .htaccess file and update the setting as provided below,
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
I did this activity but the links are not working I'm receiving 404 error.
Before updating this file link the url's used to work with index.php/
This .htaccess file is placed in the folder where I have installed the folder.
Any input in this regard will be appreciable.
Thanks in advance.
If this .htaccess file is in the /wordpress directory, then move it to the above directory, and it should work.

Wordpress perm links

Whenever I set the permanent links on wordpress to something other than the default
p=123
The links go to 404 pages
For example:
http://thewebsite.com/i/blog/2012/05/sample-post/
Would be linked as the blog post, but it would take you to a 404 result.
What can cause this kind of issue?
You need to have a rewrite in place.
In the root of your website, create a .htaccess file. This will be a hidden file but if you are using Filezilla as a FTP program you will be able to view it.
Put in it this:
# 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
Save it in the root of your website, ie, where wp-config goes and it should work.
If you have your website in a sub directory you will need to change the Rewrite base to reflect this instead of / for root.
Hope this helps!

Categories