I installed wordpress and configured and I wrote a post and publish the post but I get this error:
"The requested URL /myPost/ was not found on this server."
I modify my httpd.conf file and I add:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
and I also add .htaccess in my web root directory:
RewriteEngine on
<IfModule mod_rewrite.c>
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
and restarted apache. But now I'm getting the following error:
Oops! That page can’t be found.
Any of you knows what is wrong or how can I fix this to able to see my post in wordpress?
I'll really appreciate you help.
The issue is caused due to the permalinks now set correctly.
Perform the steps
1) delete the .htaccess file - WP will create it automatically
2) Change the permalink settings
WP site pages and posts works fine
Related
I have migrated one of my client's sites to Linode. Now the homepage is working and the rest of the pages shows "NOT Found" and "The requested URL /apk-download/ was not found on this server."
Apache/2.4.25 (Debian) Server at www.frpbypass.us Port 80
URL: [http://www.frpbypass.us][1]
I have tried to change:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Also, added the WordPress default .httaccess.
# 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
After making the changes, I have restarted the Apache web server as well as Server reboot.
Any idea of how to fix?
Thanks in advance.
Simply go to setting -> permalink and change your default permalink setting twice.
It will change the default htaccess and your site will start working.
Finally, I am able to fix the issue. If you're experiencing the same issue then first just saving the Permalink should fix the issue. If not then try .htaccess method and finally looking for apache2.conf file.
In my case, I made all the changes as above but enabling the apache2 rewrite mod fixed my issue.
Use this command:
sudo a2enmod rewrite
Hope this helps anyone who faces the same issue. It took hours of research to finally fix the issue.
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 ?
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.
Reset your desired permalink from wordpress admin area and add this code in htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Now, check with blog posts and pages.
Thanks,
You can go to preferences -> services & ports and you need to check enabled ssl for Apache
It's working for me
You are receiving this error because your webserver cannot find the file, and it's not passing the request to Wordpress.
You need to add rewrite rules for your Wordpress, and instructions for that depend on your webserver software (Apache, nginx, etc).
Example with nginx:
location / {
try_files $uri $uri/ /index.php?$args;
}
Which literally means: try to open "/2015/03/16/post-5-problem/" in filesystem first, if it doesn't exist try to add a slash, if that doesn't help pass the request to index.php (which is Wordpress main file) with the arguments.
Enabling rewrite module is not enough, you have to add rewrite rule(s).
Have been around the houses with this - have read many htaccess issues etc - and still can't seem to get this to work.
I have a WordPress site installed at var/www
I wanted to have a specific URL point to a specific page. Started by browsing some WordPress plugins. None of them worked so I just went straight to the source and started editing the .htaccess file in the root of the WordPress installation. This is where it started getting frustrating.
One of the many attempts at an .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymLinks
Redirect 301 /redirect-me http://my-wordpress-site/?page_id=15
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
All attempts at a Redirect have resulted in 404 Not Found errors.
I have asserted the following things:
Apache2 Rewrite Module is enabled
www-data has both read and write access to the .htaccess file.
AllowOverride is set to All in the apache2.conf file for the directory
Here's a big clue for you: swapping the last ReWrite rule within my .htaccess file does absolutely nothing to my WordPress site...
RewriteRule . /poo.php [L]
Any other suggestions for debugging a failing .htaccess file?
When you make configuration changes such as AllowOverride in the config, make sure your do a restart on Apache2 so the changes become effective. Give that a shot.
I have a friendly URL module redirecting my index page to a search page. If I write index.php with my link then it redirects me to index page. If I try to access registration page it gives me error
ABS_PATH is not loaded. Direct access is not allowed.
If I try to access any category it gives me an error such as
Not Found
The requested URL /for-sale_1/toys-games-hobbies_1/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I have checked my error log it is giving me this error
<IfModule mod_rewrite.c> is without </Ifmodule>
Works great on the local server, but not on the remove live using Apache.
Category links work on the live site but when I click to register or login or publish link it gives the error:
ABS_PATH is not loaded. Direct access is not allowed.
Here is the rule for register that is defined in generate_rules.php
$rewrite->addRule('^user/register$', 'index.php?page=register&action=register');
define('REL_WEB_URL', '/home/xxx/public_html');
define('WEB_PATH', 'xxx.com/';);
You should disable MultiViews option. Write the following line in your .htaccess file (it should be in the root folder of your OSClass installation):
Options -MultiViews
Moreover, you should make sure that the .htaccess file exists.
Try disabling negotiation module of apache or disabled MultiViews directive in server's configuration and/or .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Options -MultiViews
</IfModule>
create .htaccess file , copy root folder working!
I have a permalink working but as soon as I create a post it tells me that soory post not found permalink setting is to "/%pagename%/" and here is .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ryan/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . ryan/index.php [L]
</IfModule>
# END WordPress
Try clearing the permalink setting in wp_options in the database and then reset permalinks in Wordpress. It's usually option_id 30 and called permalink_structure.
Check your apache configuration and verify that for the directory in which you store your Wordpress installation you have following settings enabled (probably you will have more configuration options for the specific directory, but these are the minimum required for Wordpress fancy permalinks):
<Directory var/www/>
FollowSymLinks
AllowOverride All
</Directory>
Do you have mod_rewrite installed on the server?
Try %postname% in permalink setting rather than /%pagename%/