0

I have written a .htaccess vanity url to redirect to users clans (or groups as most of you's may call the functionality) so instead of domain.com/groups/clan.php?id=something I have it operating as domain.com/something

Now what I want is with the posts instead of domain.com/groups/view_update.php?pid=post_id I want domain.com/soomething-group-name/posts/post_id

How can I archive this as I am stumped??

Here's my Code So Far:

RewriteEngine On

# Make sure you only match on files/directories that don't actually exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite the first part after the `/` into a `username` parameter

RewriteRule ^(.+)$ groups/index.php?gname=$1 [L,QSA]

Thanks Loads :)

phillbaker
  • 1,518
  • 11
  • 22

0 Answers0