Wordpress post showing 404 error in subfolder? - php

I have installed wordpress in main domain (fewinfo.com) and its running successfully. now, i have installed wordpress in subfolder (fewinfo.com/wp) but when i check post inner page it shows 404 error.
I have updated .htaccess using below code but not working and also I have tried without "wp" that also not working.
NOTE : Website have hosted in Godaddy
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress

Go to Settings » Permalinks, and simply click on Save Changes button.

You can replace or export data using Wp Migrate DB.
Easy to replace any url in your current database without lose any data or serialization issue.
Changing the Site URL multiple ways.
After Change Url Update:
Go to
Settings » Permalinks
Update permalink.

Related

Wordpress: Images not rendering on the site

I'm working on a client wordpress website with a custom theme. The problem is that images are not rendering on the website (eg. Logo, slider images, etc). I've checked the media library and whenever I'm trying to access the image URLs it says 500 internal server error. The website is hosted on a Windows server (XAMPP) and has IIS 7.
The website was actually running fine until i noticed that by default the url had index.php in it for all the website links (Eg. http://example.com/index.php/about-us/vision-and-mission/, http://example.com/index.php/core-values/, etc ). I later discovered that in the permalinks, they were using custom links with index.php in it so I just changed the custom structure to postname which actually broke it all.
I've checked the images in the server and they are present there at the very URL but somehow its not coming up on the frontend.
PS: This is .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
Any help would be appreciated!

Moving wordpress site from hosting to localhost for development

After moving website to my local dev machine, relative links stopped working. When i click button with relative link /login, for example, browser redirects to
https://localhost/login/
and shows
Code: Not Found
The requested URL /index.php was not found on this server.
While it should have redirected to https://localhost/сс/login/
.htaccess contents on localhost:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cc/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cc/index.php [L]
</IfModule>
Website files are in var/lib/html/cc folder.
SiteURL and HomeUrl
are both equal to http://localhost/сс
Parmalinks setting http://localhost/cc/sample-post/ is used, so no problem with navigating to pages.
How to fix this issue?
Tried different .htaccess modifications, moving index.php to /var/lib
Nothing helps.
just use WP Migrate DB plugin for database export , it will change all link to your desire link and use this database export file in live site
Link ( https://wordpress.org/plugins/wp-migrate-db/)

Wordpress permalinks doesn't work on a subfolder installation

The site used to be on the main domain with the plugin "polylang", that created an extension "en" to my domain. I have disabled this plugin and installed a fresh wordpress on a sub folder called "en".
I have kept the same URL's for SEO purposes.
Now when i press on any of the new URL's, If that URL used to exist on the old version of the site (with polylang) - it takes me to the old URL, without the /EN extension.
If i press on a new URL (that didn't exist on the polylang version) it takes me to a 404 page.
I have refreshed the "permalinks" under the page admin several times. made sure the .HTACCESS file is currect:
# 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
Disabled all plugins and moved the the default theme, but still this happens.
I took a look under my wp-config.php file and made sure i have this:
define( 'NOBLOGREDIRECT', 'http://www.med-1.com/en' );
Also i cleared my browsing data.
Any other suggestions ?

Wordpress site moved to new server, permalinks work but homepage redirects and creates a WP 404 error

I apologise if this has been asked, I was unable to find clear information anywhere on it.
We've recently been forced into moving to a VPS hosting package.
Thewre were a few issues with links that I managed to fix but now the issue lies with the home page. Every page apart from the home page works as should and at the correct address. I.e. website.co.uk/contact instead of /blog/contact.
I assume this has either something to do with the .htaccess file and/or mod rewrite being disabled on the new server.
Most solutions I`ve found all relate to the homepage working and the other pages not. I'm having basically the opposite of this problem.
See http://www.crowdwifi.co.uk it redirects to the /blog/ and creates the 404 Error within Wordpress. You can see from there the other pages and permalinks are fine.
Im on tablet at the moment but can post htaccess code for the root in here in an hour if it helps. I contacted host support but theyve been rather slow so I figure it may be easier for me to try and resolve it.
Added the .htaccess from the "/blog/" subdirectory below.
# 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
Have you checked your Front page settings are not pointing to a specific page?
Dashboard => Settings => Reading => A static page (select below) => Front page
Have you also checked your General Settings do not have the wrong URL?
Dashboard => Settings => General => WordPress Address (URL)
Dashboard => Settings => General => Site Address (URL)
Can you post up a copy of your .htaccess file?
EDIT:
Set both WordPress Address (URL) and Site Address (URL) to http://www.crowdwifi.co.uk if that doesn't work then try changing your htaccess to this as well:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress

wordpress blog. too many redirect error on chrome, blank page on FF

I have a wordpress blog and it was working correctly but suddenly I get blank page on FF when I try to browse to mydomain/wp-admin. on Chrome I get error too many redirect. when I browse to the site itself it open fine.
I disabled all plugins and removed most of them but that did not solve my problem.
I change permalink to default and that solve the problem but I need to use pretty url (postname)
my .htaccess file with permalink set to postname
# 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
Thanks
I found the problem
I was placing directory password on mydomain.com/wp-admin for extra security. but why that cause too many redirect error ???? any one ?
I think you are using hosting with Windows Operating System..
Windows OS doesnot allow you to write .htaccess file..
I found the problem I was placing directory password on mydomain.com/wp-admin for extra security. but why that cause too many redirect error ????

Categories