WordPress URL htaccess rewrite problems - wordpress

I'm having an issue after moving to a new server where my WordPress htaccess URL rewrites are redirecting ALL links back to the homepage.
Here is my current 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
On the old server I used this htaccess file with zero problems - however the new server I have the problem where ANY URL is redirecting to homepage. If I type the "unwritten" URL in (with the query strings) the page comes up fine.

Two ideas:
http://wordpress.org/support/topic/all-permalinks-redirect-to-homepage-1
Deactivate all plugins an reactivate one by one.
http://wordpress.org/support/topic/blog-posts-redirecting-to-home-page
Click the save button in the permalinks panel.

Related

WordPress Permalinks only work with index.php in the URL

When I try to change my WordPress Permalink settings, links to posts and pages return a 404 page. I have found the only way to get them to work is to either use Plain permalinks or to include /index.php/ in my permalink url, like domain.com/index.php/postname. How can I get them to work without index.php being part of the URL?
My .htaccess is below, and I have also used the .htaccess suggested at https://wordpress.org/support/article/using-permalinks/#creating-and-editing-htaccess, but changes to the permalinks puts the code below back into the htaccess file. Mod_rewrite is enabled on my Apache server.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

HTAccess ModRewrite not working for directory to file

I'm trying to create a rewrite rule in htaccess to point a directory at a file, I keep getting 404 errors in return. I should mention, the main site is a wordpress site and I'm trying to redirect one of it's url's internally for a page with a trailing folder to another url.
For instance, this is the url for the wordpress page:
/homes-for-sale-details/4420/217007490/177/
The landing page I'm trying to create within that url is:
/homes-for-sale-details/4420/217007490/177/Fb-landing-page
So I did this:
RewriteRule /homes-for-sale-details/4420/217007490/177/Fb-landing-page/(.*)$ /propertylisting1/index.php?success=$1
No go, I get a 404 error in return. The wordpress page still work, but this won't.
Right now this new rule is placed after wordpress' own rewrite:
RewriteRule . /index.php [L]
I've also tried placing it before wordpress' rewrite and it breaks all my wordpress pages.
I had it in the wrong place, after much testing I found out if I place this rewrite before the RewriteCond statements, it works, and it doesn't brake other Wordpress rewrites.
So the final is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^homes-for-sale-details/4420/217007490/177/Fb-landing-page(.*)$ propertylisting1/index.php?success=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

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>`

Wordpress 404 PAGE

I recently migrated my site to a new domain and a sub dir under that domain. quivinat.com/quv1anTemp/ My Wordpress 404 page is going to an old page seems to be from where my site use to be because it is pulling in the old header. I did a test and I modified the 404.php but it did not have any effect on the 404 landing page.
Not sure what is going on.
Any suggestions.
Try typing in "quivinat.com/quv1antemp/ and you will notice that the header is says HotFoot. This is my old header.
.htaccess file is as follows
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /quv1anTemp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /quv1anTemp/index.php
</IfModule>
# END WordPress
In the dashboard under General > Settings the Wordpress URL and Site Address must be changed to use the new domain.

Setting up a another website on a wordpress folder

I am setting up a website inside a wordpress installation folder.
So it's like:
http://mysite.com/newsite/
Primarily, http://mysite.com is a wordpress installation, now I want to set up another site*(not a wordpress website)* on that directory which is newsite,
So basically it looks like this mysite/newsite/
When I go to that link, it changes the URL and leads me to a page of mysite page. I think maybe because of the .htaccess of the wordpress installation.
How can I access on my newly setup website without being redirecting me to http://mysite.com page?
PS:
Wordpress .htaccess configuration:
# 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
Your help will be appreciated!

Resources