I want to redirect old URL to new URL but old URL also working because I already submitted old URL. How to fix this problem?
For Example
http://example.com/p/holi/happy-holi-2019 to http://example.com/p/happy-holi-2019
I want to redirect old URL to new URL but old URL also working because I already submitted old URL. How to fix this problem?
For Example
http://example.com/p/holi/happy-holi-2019 to http://example.com/p/happy-holi-2019
You can do it using Redirect 301. .htaccess
file:
Redirect 301 /p/holi/happy-holi-2019 http://www.example.com/p/happy-holi-2019
OR
Redirect 301 ^p/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/?$ http://www.example.com/p/$2