/    Sign up×
Community /Pin to ProfileBookmark

mod rewrite help

Hi,

I am trying to build a site with member pages.

The way the site is setup is when someone types

[url]http://www.abc.com/user[/url] then viewmember.html?username=user gets called.

The .htaccess file is

AddHandler application/x-httpd-php .html
Options +FollowSymLinks
RewriteEngine on
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ viewmember.html?username=$1 [L]

But now I also want to have 2 URLS

[url]http://www.abc.com/view/user[/url] or [url]http://www.abc.com/user/view[/url]
( I can use any of these) to call viewmoredeails.html?username=$1

and one more
[url]http://www.abc.com/view/buy/1234[/url] to call viewbuydetails?username=$1&itemname=$2

I am not able to figure out what I can do.

I tried #RewriteRule ^(view)/(.*)$ viewmoredeails.html?username=$1 [L]
But this does not work.

I am a total newbie to this. Please advice.

Thanks.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @swapdude 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.25,
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,
)...