Home Redirect Using .htaccess file - Page/pagenumber
Reply: 0

Redirect Using .htaccess file - Page/pagenumber

user1107
1#
user1107 Published in July 20, 2018, 1:08 am

I am stuck with my limited knowledge of .htaccess file.

i am migrating from one site to another. lets say my old site is cws and my new site is sa

my old site cws urls are with cws/category/category name.. while my new website sa is without category.

I also change the slug of the categories.

i write a rule like

RewriteRule ^category/love/(.*) https://newdomain.com/angry-relationship-advise/$1 [R=301,L]

now on the google search i saw my categories pages are also index.

now if someone click on google like

http://oldsite/category/love/ its redirecting to https://newdomain.com/angry-relationship-advise

But if someone click on

http://oldsite/category/love/page/2 or http://oldsite/category/love/page/3 it didn't redirect to

https://newdomain.com/angry-relationship-advise/page/2 or https://newdomain.com/angry-relationship-advise/page/3

Can anyone help me with this. i have tried (.*) or $1 but its working for base url.. not with pages.

Looking for your help.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.537599 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO