Thread: Apache2 RewriteRule help
if post belongs in programming boards, so, , i'll move it.
here's i'm trying accomplish:
user browses server http://myserver.tld/p/pagename , url gets passed through rewriterule in .htaccess file become http://myserver.tld/index.php?p=pagemname on backend. seems simple enough, can't seem make work. keep getting 404's.
here's .htaccess file:
i used extent of google fu arrive @ point, , way understand rewriterule work this:code:options +followsymlinks rewriteengine on rewriterule ^p/([^/]+) /index.php?p=$1 [nc]
urls have (after tld): /p/anythingexceptaslashatanylength , translate ?p=thecontentmatchingtheregexpattern
isn't working. can explain i'm doing wrong, , more importantly, why it's wrong?
1 thing find interesting if run:
i get:code:sudo a2enmod rewrite
but if run:code:module rewrite enabled
i get:code:sudo apache2ctl -l
and mod_rewrite in list. remains true if restart apache. ideas, anybody?code:compiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.c
check apache's error log see file it's trying read 404s.
edit: mod_rewrite doesn't appear in compiled in modules either, , it's working fine.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] Apache2 RewriteRule help
Ubuntu
Comments
Post a Comment