.htaccess issues with wordpress after moving website - wordpress

I have transferred my website subdomain to main public_html directory,
but root directory taking all file link form sub directory, here is my .htaccess
what is new htaccess code for polestarllp.com main directory
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /polestarnew/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /polestarnew/index.php [L]
</IfModule>
# END WordPress

.htaccess code for polestarllp.com main directory
# 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 also need to change in database wp_options table siteurl and home to new site url

Related

Non Wordpress file/ folder in public_html not working

I have installed WordPress in the root directory. There is a folder "order" and "admin3" in the same directory. I can not open this folder www.mysite.com/order with this URL or any file inside of it www.mysite.com/order/login.php. When I open this file I get " is currently unable to handle this request.
HTTP ERROR 500".
I have tried this on the .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/order/(.*)$ [OR]
RewriteRule ^.*$ - [L]
</IfModule>
# 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

WordPress multisite | ROOT redirects to SUBFOLDER

I have a problem on my WordPress multisite. There's a WordPress installation on the root folder (public_html) of my domain and it was working fine.
We had to install a second WordPress site in a subfolder (public_html/subfolder).
If I try to access example.com/subfolder, the second website works fine.
If I try to access example.com, it redirects to example.com/subfolder. I no longer can access the first website.
ROOT .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
SUBFOLDER .HTACCESS
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subfolder/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subfolder/index.php [L]
</IfModule>
# END WordPress
Can someone explain how to prevent this redirect?
Thanks!
Try to delete (or rename) root .htacces.

I have a permission issue in wordpress htaccess

This is my htaccess ,it is simple wordpress htaccess but it is not working my server folder structure
# 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
And it is my server folder structure(site name /www/html/all wp file)

Load folder on specific Wordpress URL(category URL) with .htaccess

I'm trying to load the content(index.html) from specific folder on specific(already used URL) in Wordpress.
Here's the .htaccess file(default):
# 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've tried with few variations of this rewrite rule:
RewriteRule ^/category/funny-posts/ /funny-images/ [L]
So funny-images is a directory on my server where I have WP installed. Both of them are in the root folder.
How can I load index.html from /funny-images/ when I type www.site.com/category/funny-posts/ ?
If the index.html file is not displaying (and the URI you want is being passed to WP) it's probably because you're putting the rule at the end. Try putting it just after RewriteEngine On. Oh, and I don't think you'll need that RewriteBase. Also, you don't need that leading slash in the new rule, just before category.
Your file should now look like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^category/funny-posts/ /funny-images/ [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Accessing Another Directory with Wordpress Installed

I have Wordpress installed on a shared host at Site5. It's installed in the root directory:
www.domain.com
I have another directory that I want to be able to access outside of the Wordpress site:
www.domain.com/directory/
When I visit this URL, I get Wordpress's 404-page. The .htaccess file, as modified by WP, reads:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I assume I need an edit to the .htaccess file to access this directory?
Edit .htaccess present inside "directory"
It should be:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /directory/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /directory/index.php [L]
</IfModule>

Resources