I have the following rewrite rule in .htaccess:
RewriteRule ^groups/([^/\.]+)/?$ groupdetail.php?gname=$1 [L,NC]
Will it take something like www.example.com/groups/groupname and call www.example / groupdetail.php? gname = groupname. And it works great.
But all relative links to groupdetail.php use groups / as a relative path, and I don't want them. How can I avoid this?
For example, when a user clicks the <a href="link.php"> link to groupdetail.php? gname = groupname, it goes to www.example / groups / link.php. I want to take the user to www.example.com/link.php.
Obviously, I want the user url to look like "www.example.com/groups/groupname", so I don't want to use [R] / redirect.
Suleman ali
source share