please help in .htacess rewrite rule

Started on the old forum in October 2011 · view the original in the archive · old links redirect here

3 replies · 428 views · started 15 years ago · 1 min read

3 participants
Lue_chin Developer · 107 posts #1

heloo masterz i need a help i want to rewrite my URL with the help of .htacess file please help me i will show a example here : if link mobilesite.com/index.php?dir=games i want that in site it shows mobilesite.com/games please reply i must thankfully to you

Donostex Junior · 17 posts #2

Try this out

 RewriteEngine on
RewriteBase /
RewriteRule ^games/$ /index.php?dir=$1

i want to be a talented php coder 🙂

razzbee Developer · 130 posts #3

ok then U can do it this way

<IfModule mod_rewrite.c>

RewriteEngine on
RewriteBase /

RewriteRule ^([0-9A-Za-z\\]+)$ /index.php?dir=$1

here,any thing starting with both aphanumeric characters and / will be sent to the folder with the same name in the url.so eg if my url is http://kloudserve.net/mp3 then my folder name should be mp3

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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