Current location: Hot Scripts Forums » Programming Languages » PHP » how to mod_rewrite


how to mod_rewrite

Reply
  #1 (permalink)  
Old 05-11-10, 03:52 AM
macintosh macintosh is offline
Newbie Coder
 
Join Date: Mar 2007
Posts: 84
Thanks: 1
Thanked 0 Times in 0 Posts
how to mod_rewrite

How can i mod_rewrite this
PHP Code:

example.com/helloworld.php?id=test 

into
PHP Code:

example.com/test/hello/world 

much appreciated, thanks.
Reply With Quote
  #2 (permalink)  
Old 05-11-10, 01:39 PM
punkrockgeek punkrockgeek is offline
New Member
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up mod_rewrite example

Hey Hey ... I believe this would work for you:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)/hello/world helloworld.php?id=$i

I just create an .htaccess file and put it in the root of my web site to make it work ... I believe that should get it ...

Good Luck !
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 08:14 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.