Jump to content

Archived

This topic is now archived and is closed to further replies.

Roee

mod_rewrite ?

Recommended Posts

i want to get this addres:
http://www.domain.com/USER

and change USER to: /members/USERS

http://www.domain.com/USER
resolves to
http://www.domain.com/members/USER


how should i do it?

Share this post


Link to post
Share on other sites
You haven't explained your problem very clearly. Perhaps you could give a real world example?

The over-literal answer is

RewriteRule ^USER /members/USER [R=301,L]

Without knowing more details of your problem, a good answer is impossible.

Share this post


Link to post
Share on other sites
i have a users system.
each user have a control panel & control of his site.
i want to make the site address of each user like his username, so if i get in to this address: http://www.domain.com/USER
i will automatic transfer (by mod_rewrite) to:
http://www.domain.com/members/USER

thanks

Share this post


Link to post
Share on other sites
Presumably, you have other pages at the root of www.domain.com that you don't want to eb re-written?

The reason for my questions is that to have an effective rule, you need to identify the pattern that you want to match. At the moment, the pattern seems to be any character whatsoever, which is fine if you want to redirect [i]everything[/i] (i.e. www.domain.com/* to  www.domain.com/members/*). I'm just not sure if that's what you really want to do?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.