Is this .htaccess rewrite even possible? -
my co-worker proposing .htaccess rewrite rule implement on our system. i'm not sure if it's possible, , want more educated me on subject verify.
here's url currently:
http://cms.phasesolutions.ca/themes/default/page.php?slug=home
here's how wants show up:
http://cms.phasesolutions.ca/pages/home/
is possible? (where variable "?slug=", , "default" folder, subject change, depending theme they're accessing , slug they're specifying)
let me know, thanks
posting solution in case need starting point.
enable mod_rewrite , .htaccess through httpd.conf
, put code in .htaccess
under document_root
directory:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on # handles /default/home/ /themes/default/page.php?slug=home rewritecond %{request_filename} !-d rewritecond %{document_root}/$2.php -f rewriterule ^([^/]+)/([^/]+)/?$ /themes/$1/$2.php?slug=home [l,qsa]
Comments
Post a Comment