Rewriting Url

Started on the old forum in April 2012 · view the original in the archive · old links redirect here

2 replies · 401 views · started 14 years ago · 1 min read

2 participants
Shivam Chawla Junior · 13 posts #1

I want to rewrite two urls.

some.site.tk/displayone.php?id=595 to 
some.site.tk/jokes/595.html

And

some.site.tk/categorize.php?category=Animal to
some.site.tk/Animal.html

What do i need to add to .htaccess file?

Add Your Site Free http://www.oursearchworld.com

just_m3. Developer · 199 posts #2

Shivam Chawla wrote: I want to rewrite two urls.

some.site.tk/displayone.php?id=595 to 
some.site.tk/jokes/595.html

And

some.site.tk/categorize.php?category=Animal to
some.site.tk/Animal.html

What do i need to add to .htaccess file?

RewriteEngine On RewriteRule ^jokes/([^/]).html$ /displayone.php?id=$1 [L] RewriteRule ^([^/]).html$ /categorize.php?category=$1 [L]

This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close