[ewiki] Re: Anyone running ewiki with mod-rewrite?
- From: Mario Salzer <mario@xxxxxxxxxxxxx>
- To: ewiki@xxxxxxxxxxxxx
- Date: Tue, 15 Jun 2004 03:48:12 +0200
> I've tried suggestions from Mario regarding how to implement a cruft-free
> URI scheme using mod-rewrite without success. I am somewhat familiar with
> this practice and have it running on several weblogs and other sites.
>
> Can anyone provide the "htaccess" and the "Ewiki_Script" setting you are
> using?
In your case, you should rename the directory containing all ewiki files
into "ewiki" again, so you can make "/wiki/" a fully virtual one. The
settings for mod_rewrite (put in DOC_ROOTs .htaccess) would then look
like:
RewriteEngine On
RewriteRule ^wiki/(.+)$ ewiki/index.php?id=$1 [QSA,L]
RewriteRule ^wiki$ wiki/ [R]
And in index.php you'd could go with following:
define("EWIKI_SCRIPT", "/wiki/");
define("EWIKI_SCRIPT_URL", "http://blog.openartifact.org/wiki/");
define("EWIKI_SCRIPT_BINARY", "/ewiki/index.php?binary=");
Note the difference between _SCRIPT and _SCRIPT_BINARY (if you need it
at all?!).
If you make the /wiki/ directory fully virtual, you won't run browsers
into problems with accessing files from /ewiki/fragments/ - therefore
you don't need a RewriteCond here.
Btw, everybody else could get "less ugly" URLs by defining EWIKI_SCRIPT
to just "?" - the id= has always been optional.
mario
PS: we need more SetupExamples, don't we?
- Follow-Ups:
- [ewiki] Re: Anyone running ewiki with mod-rewrite?
- From: Randy Brown
- References:
- [ewiki] Anyone running ewiki with mod-rewrite?
- From: Randy Brown
Other related posts:
- » [ewiki] Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- » [ewiki] Re: Anyone running ewiki with mod-rewrite?
- [ewiki] Re: Anyone running ewiki with mod-rewrite?
- From: Randy Brown
- [ewiki] Anyone running ewiki with mod-rewrite?
- From: Randy Brown