Change/ refresh permalink after restoring the page from trash - wordpress

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

Related

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

Wordpress redirecting to wrong homepage

I worked for a few days on XAMPP with a wordpress platform. After I bought a domain, I decided to use Duplicator plugin to transfer my whole wordpress snap to the new server. Everything is working just fine except for one single thing: whenever I go to my website, instead of visiting the actual page that should be "www.example.com/welcome" it redirects automatically to "www.example.com/wordpress". I made some research about it and discovered that usually wp is installed in a wordpress directory, but I completely made sure that:
on htaccess there is no /wordpress directory url
on index.php there is no /wordpress directory url
on wp-config there is no /wordpress directory both on SITE-URL and HOME
made sure that on the wp-admin config panel in the General section, the URLs are both set to the root directory.
For some unexplicable reason, everything is working fine, www.example.com/shop works for example, but if I set from the customization panel a page like "www.example.com/dummy" as homepage, then THAT page won't be found because it automatically redirects "dummy" to "/wordpress" which of course does not exist. You can type www.example.com and be redirected to www.example.com/wordpress and the same thing happens if you type www.example.com/dummy, since now that should be the homepage.
Can anyone explain me why is this happening? I searched everywhere but I can't find an answer.
I'm using the Storefront theme and Woocommerce plugin if that might help.

Change only the home URL in my WordPress site

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

301 redirect in htaccess not working as expected

I am trying to add a simple 301 redirect to a website's htaccess, but no redirection is occurring, nor am I encountering any errors--can anyone shed some light? The redirect would redirect people visiting an old blog post to a new page:
old blog post: https://www.horizonhomes-samui.com/horizon-homes-construction/
new page: https://www.horizonhomes-samui.com/construction/
The redirect code I'm using is:
Redirect 301 /horizon-homes-construction/ https://www.horizonhomes-samui.com/construction/
Possibly Relevant Info
My site is a Wordpress site.
I also tried adding a "RewriteEngine On" line to the top, but that did not resolve the issue.
The htaccess file I'm editing is located in my WordPress root directory (along with wp-content, wp-admin, index.php, etc).
The instructions I'm following for adding the 301 redirect are from this guide.
Thanks.
When you don't have a lot of control over the server, which is the case for a lot of wordpress sites, a plugin is better than trying to update the .htaccess file.
I am sure there are a lot of good plugins that do this. This one has worked for us.
https://wordpress.org/plugins/redirection/
With the help of my server admin, I ascertained why this 301 redirect was not working. It is because my site is on an Nginx server, so any redirects added to htaccess will not be read by the server. My server admin was able to add the redirects properly.

Wordpress: remove page search by date

In wordpress, I want to remove page: http://domain.com/2016/03/16/
I mean: when somebody access this page, content is not found 404
There are multiple ways to do this. First and easier is using a plugin. This one for example:
https://wordpress.org/plugins/simple-301-redirects/
Or you can edit your .htaccess file located on the root of your website. Then add a rule to redirect the page you want to the 404 page of your site.
#This allows you to redirect /2016/03/16/ to /404/ (assuming the path to your 404 page is /404/
Redirect 301 /2016/03/16/ http://domain.com/404/

Resources