I want to rewrite my URL from
https://abc.com/category/computers/21 (this may be any number)
To:
https://abc.com/category/computers
I have tried some methods like given below but it is not working
RewriteRule ^category/([^/]*)/$ interna.php?name_of_Category=$1&category_number [NC,L]
please help me.
Thanks
Check out this online tool for creating your .htaccess files: http://www.htaccessredirect.net/
which gives you:
//301 Redirect Entire Directory
RedirectMatch 301 https://abc.com/category/computers/(.*) https://abc.com/category/computers/
Hopes this helps. Also, can I ask why you want to re-direct all the pages to the main directory?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.