Mod_rewrite!

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

#mod

5 replies · 686 views · started 15 years ago · 1 min read

3 participants
tkreturns Developer · 98 posts #1

Ohk guys can anyone here can explain me how to use mod_rewrite in .htaccess file.! What i exactly want is

My url is http://www.mysite.com/index.php?cat=1

I want it to be http://www.mysite.com/1/

i know it can be done.

but i really don't have an idea.

because ?cat=1 is not secure. So anyone out there out to help me? 🙂

ASK FOR HELP

subzero Super moderator Fellow · 3,954 posts #2
RewriteEngine On 
RewriteRule ^/(.*)/$ /index.php?cat=$1

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

tkreturns Developer · 98 posts #3

subzero wrote:

RewriteEngine On 
RewriteRule ^/(.*)/$ /index.php?cat=$1

how is it supposed to work bro?

ASK FOR HELP

subzero Super moderator Fellow · 3,954 posts #4

Go here

Host4u.me

Now click Order but not click it but look 😛

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

tkreturns Developer · 98 posts #5

ahhh i get it 😀 lol thnks subz you always der man 😀

ASK FOR HELP

vinhthuy Newbie · 1 posts #6
RewriteRule ^(.*)\.php$ /$1.html [R=301,L]
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
 
RewriteRule !\.(html|php)$ - [S=4]
RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5 [E=uscor:Yes]
RewriteRule ^([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4 [E=uscor:Yes]
RewriteRule ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3 [E=uscor:Yes]
RewriteRule ^([^_]*)_(.*)$ $1-$2 [E=uscor:Yes]
 
RewriteCond %{ENV:uscor} ^Yes$
RewriteRule (.*) http://d.com/$1 [R=301,L]

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