wordpress redirecting all pages to homepage - php

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).

Related

wordpress 404 error when trying to acess folder on root

I have a wordpress website and within the root directory a folder called /ideal/.
The function for the /ideal/ folder is to make payments trough the website from visitors.
Everything worked well for a while, since a few days there is a problem with the page.
When i navigate to my website http://www.nibincasso.nl/ideal/ it wil show up with a 404 error.
With the release of wordpress 4.0 it looks like wordpress is trying to make some sort of dynamic link for the folder /ideal/.
However i want it to open as a static page, not by making it a wordpress dynamic page. “http://www.nibincasso.nl/ideal/index.php”.
Example of .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
Can someone help me with a solution for this problem?
Kind regards,
Fabi
Update *
I created a new subdirectory on my root with a blank index.php page only saying test
This one opens fine. But when i try to enter the subdirectory /ideal/ with the index.php i get a 404 error. How come?
Try following
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ideal/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ideal/index.php [L]
</IfModule>
# END WordPress
There seems to be a problem with the php code inside the index from the /ideal/ folder.
I will search for the solution this is not a wordpress problem.
Thanks for helping me for so far.

Need both "www" and without www to work on WordPress site

This is a WordPress site.
Originally the person who built the site had set it up so that the site gets pulled up by going to domain.com. So all requests for www.domain.com gets punted to domain.com.
This is the standard code inside my .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
How can I change my .htaccess file so that this forward does NOT happen and folks can get to the site using BOTH domain.com as well as www.domain.com...??
Looks like WordPress itself determines which version will show up. The WordPress Address field in Settings is what sets the tone. There is no easy way to make both non-www and www work. Can be done via .htaccess I suppose but definitely not worth the effort.

Error 403 Forbidden if I go to a wordpress url that is the same of an existing directory

I am developing a new site in wordpress, my site is completed and I want to replace it with my old site (not a wordpress site, a php and html site).
The moving wordpress procedure is correct (I have installed wordpress in a subdirectory), i can see everything but when i go to a page like www.site.com/mypage which is the same name of an existing folder in my site (www.site.com/mypage) i get the 403 error.
in the folder there is not a index.php/html file.
I want to keep this permalink structure and the folders name..
I do not want to show the list of files in the directory, but only the page I have created in wordpress.
how can I fix it?
thank you
htaccess here:
# BEGIN WordPress
<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>
# END WordPress
Just ran into this problem and found an answer here: http://jeffreybarke.net/2011/01/wordpress-permalinks-403-forbidden-error/
In short, you need to write a few lines into your .htaccess which specify the folder names with the problem:
# Fix 403 errors on existing directories; WordPress overrides.
RewriteCond %{REQUEST_URI} ^/(folder1|folder2|etc)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]

Redirect to outside Wordpress

I have a folder called "stats" on my server that I cannot access anymore because wordpress redirects it to the "Page not found". This folder has nothing to do with wordpress. I have searched for a solution but nothing seems to be working. I am using the theme elegant fusion.
For clarification, the folder is on the same level directory wise as "wp-admin", "wp-content", "wp-includes".
Does anyone know how I can access my folder without going through wordpress?
Thank you in advance!
Enable searach engine optimised permalinks is the answer. I am thinking you must be using the default permalinks, by enabling seo permalinks in Settings->Permalinks in the backend will create (assuming permissions allow, if not you do it manually) an .htaccess file in the root of your install like so;
# 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 two lines that will solve your problem are;
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Which tell wordpress to ignore any url which is for an actual directory or file. Anything else gets rewritten by Wordpress.

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