Rewrite CG's user directory profile URLs with htacces

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am

Rewrite CG's user directory profile URLs with htacces

Post by Recon »

Hi,

Is it possible to rewrite CG's user directory profile's urls like there are no subfolders? I know it can be done, but I am not familiar with htacces, so any tips for that?

"http://www.domain.com/users/7/56/username

to

"http://www.domain.com/username

With htacces I can rewrite one folder (7) with this:

RewriteCond %{REQUEST_URI} ^/7/([^/]+)/$
RewriteRule ^(.*) %1/ [R=301,NC,L]


-Recon
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Rewrite CG's user directory profile URLs with htacces

Post by Dr.CSS »

Most likely you will not be able to do this, if the htaccess rule works it will have to be replicated for every article ID number[or whatever it is], /7/56/...
Post Reply

Return to “The Lounge”