View unanswered posts | View active topics It is currently Fri Nov 17, 2017 7:10 am



Reply to topic  [ 3 posts ] 
 URL Rewriting rule in .htaccess 
Author Message
Junior Member

Joined: Wed Jun 14, 2006 12:38 am
Posts: 1
Post URL Rewriting rule in .htaccess
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.


Wed Jun 14, 2006 1:03 am
Report this post
Profile
Junior Member

Joined: Fri Apr 28, 2006 12:41 am
Posts: 3
Post 
Read out this page http://httpd.apache.org/docs/2.0/misc/rewriteguide.html hopefully it will help you.


Wed Jul 05, 2006 5:14 am
Report this post
Profile
Junior Member

Joined: Fri Apr 24, 2009 10:58 pm
Posts: 2
Post I have the same problem regarding .HTACCESS
:confused:


maximuz_2k2 wrote:
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.


Fri Apr 24, 2009 11:03 pm
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.