/    Sign up×
Community /Pin to ProfileBookmark

.htaccess url rewrite rule problem

Hi i would like to get have an idea how does url rewriting fully works, because i want to change the dynamic address of my link to change into static.

like the example below
dynamic address
http://www.mydomain.com/view_links.php?command=show&catID=136

with the use of .htaccess i want to have a static address like the one below:
http://www.mydomain.com/view_links-command-show-catid-136.htm

i tried to put the code below to my .htaccess file but still it didn’t work
Options +FollowSymLinks
RewriteEngine on
RewriteRule view_links-command-(.*)-catid-(.*).htm$ view_links.php?command=$1&catid=$2

—— ADDITIONAL INFO ————

my code in php
<a href=’http:/www.mydomain.com/view_links.php?command=show&catID=’.$row[‘catID’].’>More Links</a>

when looking at the front page and point the mouse over the link “more link”
the address would be like this one –> “http://www.mydomain.com/view_links.php?command=show&catID=136

What i would like to happen is make an static address from the dynamic address using .htaccess

i’m not really so sure how it works.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @maximuz_2k2 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...