apache - Rewrite url page not found .htaccess -


i'm trying rewrite url .htaccess beautify urls i'm getting page error. surprises me it's working on friend's machine using xampp , i'm using apache on linux machine.

# turn rewrite engine on rewriteengine on   # rewrite info.php?id=xx  rewriterule ^photos/([0-9]+) info.php?id=$1 [nc,l]   # rewrite profile.php?user=xx  rewriterule ^user/([0-9a-za-z_-]+) profile.php?user=$1 [nc,l]   # rewrite logout.php?redirec=xx  rewriterule ^logout/([0-9a-za-z]+) logout.php?redirect=$1 [nc,l] 

the probable cause of error appears mod_rewrite not loaded. check apache's httpd.conf file, , search line:

loadmodule rewrite_module modules/mod_rewrite.so 

if there # before it, remove , restart server.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -