- Joined
 - Dec 28, 2020
 
- Messages
 - 56
 
- Likes
 - 97
 
- Degree
 - 0
 
Hey guys. I want to redirect each link with a query string to a specific address by appending the string. I have the following in my htaccess:
RewriteEngine On
RewriteCond %{QUERY_STRING} catid=([0-9]+) [NC]
RewriteRule (.*) catid%1? [R=301,L]
When a user hits domain.com/?catid=10, they are successfully redirected to domain.com/catid10, which is what I want.
However, when they go a directory deeper (domain.com/category/?=catid10), they are not redirected to domain.com/category/catid10.
I have been reading manuals but can't find the answer. Please help?
				
			RewriteEngine On
RewriteCond %{QUERY_STRING} catid=([0-9]+) [NC]
RewriteRule (.*) catid%1? [R=301,L]
When a user hits domain.com/?catid=10, they are successfully redirected to domain.com/catid10, which is what I want.
However, when they go a directory deeper (domain.com/category/?=catid10), they are not redirected to domain.com/category/catid10.
I have been reading manuals but can't find the answer. Please help?