Penguin

Differences between version 11 and predecessor to the previous major change of RewriteRules.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 11 Last edited on Sunday, November 17, 2002 11:11:22 pm by CraigBox Revert
Older page: version 6 Last edited on Saturday, September 28, 2002 10:33:20 am by MattBrown Revert
@@ -1,8 +1,10 @@
-Apache lets you do cool things with rewrite rules. 
+Rewrite rules are rules which apply to a string of characters, and replace some of these characters with another string. Chomsky's proposal for linguistics entailed that a grammar be described in terms of a finite number of rewrite rules capable of generating all and only grammatical sentences of a given language.  
+  
+For example, E -> TF (where E is an expression, T is a term and F is a factor) is a rewrite rule (in the context free grammar for a RegularExpression.)  
+  
+Most people reading this page will be more interested in [Apache]'s rewrite rules, which let you take a horrible URL and rewrite it into a nice one
  
-DefineMe  
-AddToMe  
  
 > On a related not I was mucking about with phpWiki and trying to get it to work the same way you have it set up. Ie, using path info based urls (eg, /wiki/!SomePageHere) and I couldn't get it to work. I'd be interested to know how you set yours up. 
  
 in the index.php "config" file: 
@@ -30,4 +32,30 @@
  
 * Make sure that !AllowOverrides is set appropriately to allow the .htaccess file to be used 
  
 I think that is all :) 
+  
+!!However...  
+  
+...with the above method you get issues with trailing slashes, or more specifically, lack of them. If you don't use one, the wiki will helpfully give you the definition of whatever you www root is. So to get around this, the following applies:  
+  
+* Copy your index.php file from where ever it is to a file in your www root simply called wiki  
+  
+* Edit .htaccess in your www root to have something like this:  
+  
+ <Files wiki>  
+ !ForceType application/x-httpd-php  
+ </Files>  
+  
+This will force Apache to treat the file as a PHP file even though it has no extension.  
+  
+* Edit your new wiki file and make sure DATA_PATH, SCRIPT_NAME and VIRTUAL_PATH are set properly (as shown at the top of this page).  
+  
+* Define PHPWIKI_DIR to be the same as DATA_PATH.  
+  
+* Add the line  
+  
+ ini_set('include_path', '.:phpwiki-1.3.3');  
+  
+to 'wiki'. Make sure you set this before anything else, particularly the include for prepend.php.  
+  
+...and you should be all set.