Internal server error 500 wordpress on server alias - wordpress

I have installed a wordpress site for a client.
The site works fine on local system as well as the test server but not on the live server. The domain is created as an Alias of an existing site. Homepage displays fine but internal pages show blank with a 500 internal server error in Firebug console.
For the past 3 days I've searched and applied all sorts of fixes to .htaccess, code etc but it doesn't seem to fix.
What I've tried:
Uploaded the code and database twice.
Generated .htaccess fresh using permalinks settings of wordpress.(there are no custom rules in my .htaccess)
Set php code to display all errors but there are none, only notices.
Talked with the server hosting guy and got the memory limit increased.
What I've not tried yet:
Persue the client to create a subdomain instead of an alias.
Please suggest any possible fixes. Thanks!
# 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
UPDATE: Issue Resolved: It was a memory issue on the server. Disabling a few resource-heavy plugins pointed me in the right direction.

Have you tried this...
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /put-the-alias-here/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /put-the-alias-here/index.php [L]
</IfModule>
# END WordPress

Related

301 Redirect all page and post urls from .html to /

I have a current site which got all URLS end with .html.
I created a new site and the URLS are pretty much the same but without .html.
I've been trying codes found here in my .htaccess file and most seem to cause Internal Server Error.
http://example.com/page1.html to http://example.com/page1/
http://example.com/page1/page2.html to http://example.com/page1/page2/
My current htacces file code is:
# 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 install Simple 301 Redirect plugin and try to setting like image below. Just tested on my live site and it's running exactly what you want.
Remember you checked Use wildcards? checkbox too.

Wordpress error in ajax request of wp-admin/admin-ajax.php not found

Ive seen many questions on this issue but none of the suggestions have been helpful to me
This is my .htaccess in the root folder
# 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
Previously in my localhost it works but after installing it on a shared hosting the error occurs whenever an ajax request is performed
Ive checked that the file admin-ajax.php is there in the wp-admin folder
When i check on the network tab on the developer tools(chrome) am getting this
Request URL:https://mydomainname.com/wp-
admin/admin-ajax.php
Request Method:POST
Status Code:404 Not Found
what could be wrong

Wordpress 404 error on every page except homepage (After migration)

I have migrated my wordpress website from my desktop over to siteground for hosting. Prior to doing this I had been using free hosting at x10. The first time I transferred the site everything worked fine. The second time I tried (new version of the website) I found that every page except the home page had a 404 error (this was with x10). I then got hosting at siteground and am still having the exact same problem. Any solutions to this?
My .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /testsite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /testsite/index.php [L]
</IfModule>
# END WordPress
To fix it
Login to /wp-admin
Go to settings-> Permalinks
and click on save changes button.
when migrate a wordpress site, you should change the wp_options table siteurl and home url,
then login to admin back end -> settings -> permalinks - set the permalinks and save,
Then you can set the .htaccess just set following code and test.
`#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>`

Some WordPress permalink problems, probably depending by wrong .htaccess configuration?

I have import on my local webserver a backup of a website made using WordPress but I am finding some difficulties with PermaLink configuration
The main problem is that if I use the permalink setted as Article Name I can see the homepage but if I click on the articles links into the homepage (to see the article) I always obtain the following message error:
Not Found
The requested URL
/wordpress35/2012/10/11/se-milano-avesse-il-mare-anzi-no-la-montagna-di-campiglio/
was not found on this server.
If I instead I use the Default settings for permalink (http://localhost/wordpress35/?p=123) I have no problem and I can access to the articles in my website
I think that this is a .htaccess problem. Can you help me to create an .htaccess file that solve this problem?
My actual .htaccess file is:
# 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 to use the URL format described as: http://localhost/wordpress35/my-article-name
Did you try creating a the wordpress .htaccess for your needs?
# 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
This should work if you didn't specify any change in the website's URL.
(If the homepage is still http://localhost/wordpress35/ )

Wordpress Intalled on a separate directory and .htaccess redirection

I've installed my wordpress site on a separate directory and followed all the steps described here and now I can access my site from my main domain. So, my Wordpress site is installed under: www.mysite.com/wp-site/ and now I can access my site under www.mysite.com, so all is great, exactly what I wanted. Wordpress is making this happen through an .htaccess file it creates that has the necessary code to make the redirection happen (SEE CODE BELOW).
My problem is that I have other directories on my site, such as www.mysite.com/another-directory-unrelated-to-wordpress/ that I cannot access anymore because I believe wordpress and the .htaccess file it created is redirecting everything to the root.
How can I avoid Wordpress from redirecting all my other subfolders and files? Thanks a ton for any ideas or help.
Here is the htaccess file code:
# 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
The way the WordPress .htaccess file works is if an existing file or directory is requested, it does not send the request through WordPress...that's what the !-f and !-d RewriteCond statements do.
So, there is something else going on with your site. Have you used Firebug or any other debugging tool to see what is happening with the request/response?
You could always enable mod_rewrite logging to see if that gives you a clue.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "rewrite.log"
RewriteLogLevel 3
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
A RewriteLogLevel of 5 would give you the most information. Make sure to comment out or remove the RewriteLog* lines when you have figured out the issue.
UPDATE: Check this other SO answer to see if it resolves your issue

Resources