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!
Related
I got a hosting with WordPress engine installed and inside the root of WP engine folders I've created another web application which is having problems with URLs containing .profile word. When this text is added to URL I'm always receiving 404 error.
Here's an example:
WordPress blog URL: https://mainsite.com
Sub web application folder name: webapp
Sub web application access URL: https://mainsite.com/webapp/
So, when I try to access URL like this: https://mainsite.com/webapp/login.php?code=user.profile I'm receiving error 404. At the same time URL like this: https://mainsite.com/webapp/login.php?code=user.profilb is working fine (2nd URL got last letter replaced by another symbol).
I think this is an issue with WordPress default mod_rewrite settings, here they are:
# 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 got no clue at all why this could happen with .htaccess file like this. Could you suggest please?
It turned out that the issue was with mod_security of a2hosting. They were blocking all sensitive linux files and folders, like: .profile, .htaccess, .bashrc...
Hope, this will help someone.
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.
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/)
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 ?
I am trying to copy down my web app from the internet to localhost on my machine for further development. The URL of my project is www.uniformlab.net. I am new to wordpress and this site is the biggest one that I have tried to copy.
I am using MAMP as my local server and have set up all the correct variables in getting the database set up. Some resources are loading and many are not, with a large download time.
This is a list of errors that are being thrown on runtime of the website. I don't think that these resources are being called from an absolute path.
I have set the home and siteurl settings in the DB to locahost:80/UNIFORMLAB
When I change the url to localhost/uniformlab/wp-admin, I am getting thrown ERR_TOO_MANY_REDIRECTS by the browser.
I have checked my htaccess file and it seems normal. This is what I have:
# 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.
There is not too much info, but one thing is that the home and siteurl in WordPress have to be the full path to the WordPress directory.
You said that your URL is http://localhost/uniformlab but you changed the setting to localhost
Update again the home and siteurl to http://localhost/uniformlab