Skip to main content

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:

code:
options +followsymlinks  rewriteengine on    rewriterule ^p/([^/]+) /index.php?p=$1 [nc]
i used extent of google fu arrive @ point, , way understand rewriterule work this:

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:

code:
sudo a2enmod rewrite
i get:

code:
module rewrite enabled
but if run:

code:
sudo apache2ctl -l
i get:

code:
compiled in modules:    core.c    mod_log_config.c    mod_logio.c    prefork.c    http_core.c    mod_so.c
and mod_rewrite in list. remains true if restart apache. ideas, anybody?

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

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい