Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > Apache Help

Apache Help Post any question relating to Apache here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-06-14, 03:03 AM
Junior Member
 
Join Date: Jun 2006
Posts: 1
maximuz_2k2 is on a distinguished road
Default 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.
Reply With Quote
  #2 (permalink)  
Old 2006-07-05, 07:14 AM
Junior Member
 
Join Date: Apr 2006
Posts: 3
ravi_shekhar80 is on a distinguished road
Default

Read out this page http://httpd.apache.org/docs/2.0/misc/rewriteguide.html hopefully it will help you.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:59 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.