Change only the home URL in my WordPress site - wordpress

I have a WordPress website and the home page is configured to be the latest posts
What I want is that only the homepage URL that is, e.g. www.test.com redirects to subdomain.test.com and when the user needs to visit the older homepage will only access through test.com/home.
I need this because we will start a campaign in a landing page (subdomain.test.com) today.
But this is only for a few days, it is not a permanent change. How can I achieve this?

you can create a new page in WP where you can redirect to your sub domain.
OR
you can do this to make some changes in .htaccess file
RedirectMatch 301 ^/$ http://newsite.com.in/
add this in .htaccess file

Related

htaccess, rewriteurl to page of WordPress site in sub-folder

Here's the scenario, I have a single server and two WordPress sites living in their respective sub-folders:
public_html/site_one/
public_html/site_two/
These sites display as follows:
www.site.com/site_one/
www.site.com/site_two/
The second of those sites has a splash page / landing page:
www.site.com/site_two/landing-page/
...that needs to display in the root of the site:
www.site.com/
I'm aware that there are better ways of achieving this, but I'm restricted to working with how it's currently set up.
Initially I thought I would be able to set up a .htaccess file in the root that rewrites access to the root of the site to display the landing page from site_two, but this isn't working as expected. This is the .htaccess file from the root of the server:
RewriteRule ^$ subfolder/page-slug [L]
This redirects to the site's front page. If I replace page-slug with ?p=1234 then it displays as the correct page but also seems to redirect to the landing page's full URL.
Is there any means of achieving what I'm after?
To clarify:
User visits site.com
URL displays as site.com
Page displayed is site.com/site_two/landing-page/
I've managed to have this behaviour working when not linking to a WordPress page (using a test index.php in 'test-subfolder') but WordPress and its own .htaccess file seems to be confusing matters.
Any help would be appreciated. Is there a way of excluding the landing page from the WP .htaccess file and what is it about the WP .htaccess file that's stopping the page being displayed at the root of the site?

Cache keeps making users go to my old web url

My home page used to be www.example.com/index.html, because I was on the Weebly platform. I then switched to Wordpress, where the home page should simply be www.example.com/home.
However, I realized if I visit the URL on a browser where cache hasn't been cleared for the past 24 hours, the website automatically redirects the user to www.example.com/index.html. Is there a way to fix this? I've Googled ways for about 2 hours and tried various Wordpress plugins...
Create a redirect in your wordpress site from /home.html to /home
Just delete old index.html and add this to your .htaccess file in root
RewriteEngine On
Redirect 301 /index.html http://www.example.com/home

Change/ refresh permalink after restoring the page from trash

I am working on a multilangual wordpress site, by accident I have moved to trash my english front page, and after I have restored from the bin the permalink has http://o3zone.demo.enetixsoftware.ro/en/__trashed-6/ --> this trashed ending, how can I remove that?
Hi Ndy i have checked your website and go through
url you have provided.
I think trashed url is crawled by google so you have to manually set 301 redirection in .htaccess file like below.
Open .htaccess file and put below code underneath # END WordPress.
Redirect 301 : /en/__trashed-6/ /en/
I hope it will work

Can not redirect php pages on WordPress multisite

I have been battling redirects all day. We have a customer with an old site, and all the old php links are broken and will redirect you to a 500 error page.
I have tried 3 different 301 redirect plugins all with the same result - regular pages will redirect, and .php pages will not.
I have also tried to redirect from /folder/file(.*) - but with no succes.
This page is made on a WordPress multisite installation so i need a solution where i do not have to add all redirects in the .htaccess file.

htaccess Mod rewrite and permalink

I have a WordPress website where the requirement is exactly like below:
WordPress site should be installed on: http://www.mydomain.com/wp/ |
Website homepage should be access from: http://www.mydomain.com/ if someone visits http://www.mydomain.com/wp/ he should be redirect to http://www.mydomain.com/
But when accessing all other inner pages, visitors should follow the URL format:
http://www.mydomain.com/wp/test-page1
http://www.mydomain.com/wp/test-page1
This means I need the main website access from main domain directly but all other inner pages should open under sub-directory as mentioned above.
how can I do that with .htaccess? Thanks
Please look into this website about htaccess redirects: http://htaccess.wordpress.com/2008/09/15/redirecting-urls-in-htaccess/
Aside from that, you will want to have your RewriteBase to be / and not wp so that the user doesn't go to wp subfolder automatically.

Resources