/    Sign up×
Community /Pin to ProfileBookmark

.htaccess URL Rewrite

Hi all, i m back with another question

I m trying to rewrite my users’ profiles from

[url]http://domain.com/premium/index.php?id=1234[/url]

to

[url]http://domain.com/abc/index.html[/url]

numeric user ID will be replaced by username while calling that link…
aslo there are different types of users fox ex. free, premium, sponsored etc…

currently i m trying to redirect the requests to a php script that will check the user against their username and get its type and then redirect to or load related pages…

Any idea…

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@cumhuriyetimAug 21.2011 — I'm doing it with 404.php. Example. http://domain.com/abc/index.html I am Exploding this link to /. There are four / in this url. after explode, being array. x0=http:, x1="", x2=domain.com, x3=abc, x4=index.html. you can write in 404.php:

if x4=index.html include..index.php, x3 = id...

kral oyun
Copy linkTweet thisAlerts:
@ZABIauthorAug 21.2011 — any other idea... using .htaccess ???
×

Success!

Help @ZABI spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...