apache - Beautifying the Url using .htaccess -
i have link http://xxxx.com/yyyy/index.php?class=applications&function=create
and want make this
http://xxxx.com/yyyy/create
i know have use the
rewriteengine on
rewriterule ..................
but since i'm new @ it, don't know how format it..
directoryindex index.php order deny,allow options +followsymlinks -multiviews rewriteengine on rewritebase / rewriterule ^(xxxxxxxx)/(aaaa)/?$ $1/index.php?class=applications&function=$2 [l,nc,qsa] rewriterule ^(xxxxxxxx)/(bbbb)/?$ $1/index.php?class=applications&function=$2 [l,nc,qsa] rewriterule ^(xxxxxxxx)/(cccc)/?$ $1/index.php?class=applications&function=$2 [l,nc,qsa] rewriterule ^(xxxxxxxx)/(dddd)/?$ $1/index.php?class= test&function=$2 [l,nc,qsa] rewriterule ^(yyyy)/index\.php$ $1 [l,nc] #this 1 not working...
enable mod_rewrite , .htaccess through httpd.conf , put code in .htaccess under document_root directory:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewriterule ^(yyyy)/(create)/?$ $1/index.php?class=applications&function=$2 [l,nc,qsa]
Comments
Post a Comment