Revision history for ModRewrite


Revision [22909]

Last edited on 2016-05-20 07:38:42 by JavaWoman [Replaces old-style internal links with new pipe-split links.]
Additions:
This page can now be found on the [[Docs:ModRewrite | Wikka Documentation Server]].
An archive of [[http://wikkawiki.org/ModRewrite/revisions | old revisions of this page]] is still available for reference.<<
Deletions:
This page can now be found on the [[Docs:ModRewrite Wikka Documentation Server]].
An archive of [[http://wikkawiki.org/ModRewrite/revisions
old revisions of this page]] is still available for reference.<<


Revision [18126]

Edited on 2008-01-27 02:34:54 by JavaWoman [Migrated to doc server]
Additions:
<<===This page has moved===
This page can now be found on the [[Docs:ModRewrite Wikka Documentation Server]].
Thanks for updating your bookmarks!
An archive of [[http://wikkawiki.org/ModRewrite/revisions
old revisions of this page]] is still available for reference.<<
::c::
CategoryMigratedDocs
Deletions:
[[WikkaDocumentation Wikka Documentation]]
====Wikka and ##mod_rewrite##====
>>**See also**
~-ModrewriteInSubdirectoryWorkaround
~-ServerErrorWorkaround
~-MissingToolbarWorkaround
~-MissingImagesWorkaround
~-MissingStylesWorkaround
~-[[ModRewriteDevelopment Development/Discussion]] >>The Apache webserver has a module called **##mod_rewrite##**; mod_rewrite "rewrites" URLs so it can do things like translate the URL http://wikka.jsnx.com/DotMG into http://wikka.jsnx.com/wikka.php?wakka=DotMG. This gives us nice, short, and user-friendly URLs to use with Wikka while internally Wikka works with the "full" URL. ---
Wikka works with mod_rewrite. And Wikka works without mod_rewrite.
===Requirements===
~1)The major requirement is that Wikka is installed on a system with **Apache** as the web server. (Some other web servers, like [[http://lighttpd.org/ lighttpd]], support similar functionality, but [[go.microsoft.com/fwlink/?LinkId=7001 IIS]] definitely does not.)
~1)Also, mod_rewrite must be enabled (//not the case on many hosted systems//)
~1)Finally, either .htaccess configuration must be allowed (//not the case on many hosted systems//) - because Wikka by default uses .htaccess files in directories to enable/disable URL rewriting - or you must have root access and be able to edit the Apache configuration (httpd.conf) directly (//only on dedicated servers or some virtual private/dedicated systems//).
===Configuration===
During installation, Wikka will try to figure out if mod_rewrite is available. If Wikka does not detect mod_rewrite, it's possible to manually configure Wikka to use it after installation.
Follow this simple instruction:
- Edit wikka.config.php (found in the root directory of the Wikka installation). ---
Change these lines:
%%(php) "base_url" => "http://my.domain.com/wikka.php?wakka=",
"rewrite_mode" => "0", %%

to this:
%%(php) "base_url" => "http://my.domain.com/",
"rewrite_mode" => "1", %%

That's it. Notice the small change. We are just removing "wikka.php?wakka=" and then setting rewrite_mode to 1. **Note that the two configuration settings must always match** - if not, you'll end up with strange errors and pages not found.
Note: this may not work when you installed wikka in some subdirectory, or if your website is running under Apache as a [[http://httpd.apache.org/docs/1.3/vhosts/ VirtualHost]] (usually indicated by a working directory of ##www/www.mysite.com## or something similar). In that case, edit .htaccess and add the following line, right after the line that reads "**""RewriteEngine"" on**":
%%(apache)RewriteBase /your/subdirectory/name%%
Even if URL rewriting is used in Wikka, the long form of the URLs will continue working so you don't need to change any links with long URLs you may already have when switching to using mod_rewrite.
===Troubleshooting===
If after following the instruction above mod_rewrite is still not working, first make sure that Wikka is actually running on Apache. Creating a page with just %%(php)<?php phpinfo();?>%% and calling this page up in the browser will give a host of information about the environment PHP is running in.
Next, check to make sure mod_rewrite has been activated in your ##httpd.conf## file:
%%(apache)
LoadModule rewrite_module /path/to/apache/modules/mod_rewrite.so
AddModule mod_rewrite.c
%%
Also, make sure that in your Apache httpd.conf file that you have enabled ""FollowSymLinks"" in the Options configuration section.
%%(apache) # The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks%%
In addition, the directive "AllowOverride" must be set to "All" before requests to access .htaccess are honored:
%%(apache)
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All
%%
Note that there might be some security issues that need to be investigated when setting this parameter to anything other than "None". Consult the appropriate Apache documentation for details.
Check your logs! For instance, if you see a "File does not exist: /some/internal/path/to/HomePage" in your ##error_log##, check ##wikka.config.php## and make sure ##base_url## is set to the correct pathname to access your wiki, //and that it includes a trailing slash (/)!// For example, if you normally access your wiki using ## http://yourdomain.com/mywiki ##, then your ##base_url## must be set to:
%%(php)
"base_url" = "http://yourdomain.com/mywiki/",
%%
==Hosted server==
If your server is Apache, there are two possibile causes why mod_rewrite may not work: Either your web host does not have mod_rewrite configured so that you can use it, or .htaccess is ignored in directories. (You may try asking your host to enable both - if that doesn't work you'll have to do with long URLs.)
==(Virtual) Private Server==
If you are controlling your own server and mod_rewrite is enabled, there are two configuration options:
~1)Make sure .htaccess files in directories are supported. **This is the easiest way to enable Wikka to use URL rewriting.** Wikka uses a .htaccess for rewrite configuration in the installation directory as well as in the following subdirectories:
~~-3rdparty/plugins/freemind
~~-3rdparty/plugins/wikiedit
~~-css
~~-images
~The .htaccess file in the installation directory **enables** mod_rewrite while the other ones **disable** it again //because these directories contain files that are directly linked to from generated HTML pages//.
~2)If you prefer, you can reproduce the rewriting rules for the installation directory (from the main .htaccess file) directly in your httpd.conf file. If you do this, make sure that either .htaccess is enabled for the mentioned subdirectories (and the .htaccess files are present there) or that you explicitly turn off rewriting in the subdirectories mentioned above by means of Directory directives.
===Known issues===
Some Apache versions for Windows have a bug that will lowercase all URLs when using mod_rewrite; this is a [[ModRewriteDevelopment problem in Wikka specifically when creating new pages]]. We're looking into the possibility of creating a workaround for this.
CategoryDocumentation


Revision [17811]

Edited on 2007-12-12 10:49:57 by JavaWoman [prevent Apache directives looking as page links]
Additions:
Note: this may not work when you installed wikka in some subdirectory, or if your website is running under Apache as a [[http://httpd.apache.org/docs/1.3/vhosts/ VirtualHost]] (usually indicated by a working directory of ##www/www.mysite.com## or something similar). In that case, edit .htaccess and add the following line, right after the line that reads "**""RewriteEngine"" on**":
Deletions:
Note: this may not work when you installed wikka in some subdirectory, or if your website is running under Apache as a [[http://httpd.apache.org/docs/1.3/vhosts/ VirtualHost]] (usually indicated by a working directory of ##www/www.mysite.com## or something similar). In that case, edit .htaccess and add the following line, right after the line that reads "**RewriteEngine on**":


Revision [17789]

Edited on 2007-12-08 20:12:49 by BrianKoontz [Added note about VirtualHost and RewriteBase]
Additions:
Note: this may not work when you installed wikka in some subdirectory, or if your website is running under Apache as a [[http://httpd.apache.org/docs/1.3/vhosts/ VirtualHost]] (usually indicated by a working directory of ##www/www.mysite.com## or something similar). In that case, edit .htaccess and add the following line, right after the line that reads "**RewriteEngine on**":
Deletions:
Note: this may not work when you installed wikka in some subdirectory. In that case, edit .htaccess and add the following line, right after the line that reads "**RewriteEngine on**":


Revision [15174]

Edited on 2006-08-22 04:40:16 by BrianKoontz [Added troubleshooting hints]
Additions:
Check your logs! For instance, if you see a "File does not exist: /some/internal/path/to/HomePage" in your ##error_log##, check ##wikka.config.php## and make sure ##base_url## is set to the correct pathname to access your wiki, //and that it includes a trailing slash (/)!// For example, if you normally access your wiki using ## http://yourdomain.com/mywiki ##, then your ##base_url## must be set to:
Deletions:
Check your logs! For instance, if you see a "File does not exist: /some/internal/path/to/HomePage" in your ##error_log##, check ##wikka.config.php## and make sure ##base_url## is set to the correct pathname to access your wiki, //and that it includes a trailing slash (/)!// For example, if you normally access your wiki using ##http://yourdomain.com/mywiki##, then your ##base_url## must be set to:


Revision [15173]

Edited on 2006-08-22 04:38:33 by BrianKoontz [+troubleshooting hints]
Additions:
Check your logs! For instance, if you see a "File does not exist: /some/internal/path/to/HomePage" in your ##error_log##, check ##wikka.config.php## and make sure ##base_url## is set to the correct pathname to access your wiki, //and that it includes a trailing slash (/)!// For example, if you normally access your wiki using ##http://yourdomain.com/mywiki##, then your ##base_url## must be set to:
%%(php)
"base_url" = "http://yourdomain.com/mywiki/",
Deletions:
Check your logs! For instance, if you see a "File does not exist: /some/internal/path/to/HomePage" in your ##error_log##, check ##wikka.config.php## and make sure ##base_url## is set to the correct pathname to access your wiki, //and that it includes a trailing slash (/)!// For example, if you normally access your wiki using ##http://yourdomain.com/mywiki##, then your ##base_url## must be set at:
"base_url" = "http://yourdomain.com/mywiki/"


Revision [15172]

Edited on 2006-08-22 04:36:26 by BrianKoontz [More troubleshooting hints]
Additions:
Next, check to make sure mod_rewrite has been activated in your ##httpd.conf## file:
%%(apache)
LoadModule rewrite_module /path/to/apache/modules/mod_rewrite.so
AddModule mod_rewrite.c
%%
In addition, the directive "AllowOverride" must be set to "All" before requests to access .htaccess are honored:
%%(apache)
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
AllowOverride All
%%
Note that there might be some security issues that need to be investigated when setting this parameter to anything other than "None". Consult the appropriate Apache documentation for details.
Check your logs! For instance, if you see a "File does not exist: /some/internal/path/to/HomePage" in your ##error_log##, check ##wikka.config.php## and make sure ##base_url## is set to the correct pathname to access your wiki, //and that it includes a trailing slash (/)!// For example, if you normally access your wiki using ##http://yourdomain.com/mywiki##, then your ##base_url## must be set at:
%%
"base_url" = "http://yourdomain.com/mywiki/"
%%


Revision [15071]

Edited on 2006-08-04 06:07:11 by DarTar [minor]
Additions:
====Wikka and ##mod_rewrite##====
~-[[ModRewriteDevelopment Development/Discussion]] >>The Apache webserver has a module called **##mod_rewrite##**; mod_rewrite "rewrites" URLs so it can do things like translate the URL http://wikka.jsnx.com/DotMG into http://wikka.jsnx.com/wikka.php?wakka=DotMG. This gives us nice, short, and user-friendly URLs to use with Wikka while internally Wikka works with the "full" URL. ---
Deletions:
====Wikka and mod_rewrite====
~-[[ModRewriteDevelopment Development/Discussion]] >>The Apache webserver has a module called **mod_rewrite**; mod_rewrite "rewrites" URLs so it can do things like translate the URL http://wikka.jsnx.com/DotMG into http://wikka.jsnx.com/wikka.php?wakka=DotMG. This gives us nice, short, and user-friendly URLs to use with Wikka while internally Wikka works with the "full" URL. ---


Revision [13191]

Edited on 2006-02-14 17:10:04 by JoachimKruyswijk [minor]
Additions:
Note: this may not work when you installed wikka in some subdirectory. In that case, edit .htaccess and add the following line, right after the line that reads "**RewriteEngine on**":
%%(apache)RewriteBase /your/subdirectory/name%%
Deletions:
Note: this may not work when you installed wikka in some subdirectory. In that case, edit .htaccess and add the following line after "RewriteEngine on":
RewriteBase /your/subdirectory/name


Revision [13190]

Edited on 2006-02-14 17:04:34 by JoachimKruyswijk [Apache rewriting when installed in subdir]
Additions:
Note: this may not work when you installed wikka in some subdirectory. In that case, edit .htaccess and add the following line after "RewriteEngine on":
RewriteBase /your/subdirectory/name


Revision [12320]

Edited on 2005-12-18 05:47:33 by JonathanMitchem [Apache rewriting when installed in subdir]
Additions:
Also, make sure that in your Apache httpd.conf file that you have enabled ""FollowSymLinks"" in the Options configuration section.
%%(apache) # The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks%%


Revision [7750]

Edited on 2005-05-01 09:17:23 by JavaWoman [adding link]
Additions:
~-ServerErrorWorkaround


Revision [7672]

Edited on 2005-04-28 09:31:45 by JavaWoman [Additions to troubleshooting]
Additions:
~-MissingToolbarWorkaround
~-MissingImagesWorkaround
~-MissingStylesWorkaround
==Hosted server==
If your server is Apache, there are two possibile causes why mod_rewrite may not work: Either your web host does not have mod_rewrite configured so that you can use it, or .htaccess is ignored in directories. (You may try asking your host to enable both - if that doesn't work you'll have to do with long URLs.)
==(Virtual) Private Server==
If you are controlling your own server and mod_rewrite is enabled, there are two configuration options:
~1)Make sure .htaccess files in directories are supported. **This is the easiest way to enable Wikka to use URL rewriting.** Wikka uses a .htaccess for rewrite configuration in the installation directory as well as in the following subdirectories:
~~-3rdparty/plugins/freemind
~~-3rdparty/plugins/wikiedit
~~-css
~~-images
~The .htaccess file in the installation directory **enables** mod_rewrite while the other ones **disable** it again //because these directories contain files that are directly linked to from generated HTML pages//.
~2)If you prefer, you can reproduce the rewriting rules for the installation directory (from the main .htaccess file) directly in your httpd.conf file. If you do this, make sure that either .htaccess is enabled for the mentioned subdirectories (and the .htaccess files are present there) or that you explicitly turn off rewriting in the subdirectories mentioned above by means of Directory directives.
Deletions:
If it is Apache, there are two possibile causes why mod_rewrite may not work: Either your web host does not have mod_rewrite configured so that you can use it, or .htaccess is ignored in directories. (You may try asking your host to enable both - if that doesn't work you'll have to do with long URLs.)


Revision [7616]

Edited on 2005-04-26 10:27:13 by JavaWoman [minor]
Additions:
~1)Also, mod_rewrite must be enabled (//not the case on many hosted systems//)
~1)Finally, either .htaccess configuration must be allowed (//not the case on many hosted systems//) - because Wikka by default uses .htaccess files in directories to enable/disable URL rewriting - or you must have root access and be able to edit the Apache configuration (httpd.conf) directly (//only on dedicated servers or some virtual private/dedicated systems//).
Deletions:
~1)Also, mod_rewrite must be enabled (not the case with with all hosted Apache systems)
~1)Finally, either .htaccess configuration must be allowed (//not the case on many hosted systems//) - because Wikka by default uses .htaccess files in directories to enable/disable URL rewiting - or you must have root access and be able to edit the Apache configuration (httpd.conf) directly (//only on dedicated servers or some virtual private/dedicated systems//).


Revision [7615]

Edited on 2005-04-26 10:21:48 by JavaWoman [some layout; added requirements, trouble shooting etc.]
Additions:
~-ModrewriteInSubdirectoryWorkaround
~-[[ModRewriteDevelopment Development/Discussion]] >>The Apache webserver has a module called **mod_rewrite**; mod_rewrite "rewrites" URLs so it can do things like translate the URL http://wikka.jsnx.com/DotMG into http://wikka.jsnx.com/wikka.php?wakka=DotMG. This gives us nice, short, and user-friendly URLs to use with Wikka while internally Wikka works with the "full" URL. ---
===Requirements===
~1)The major requirement is that Wikka is installed on a system with **Apache** as the web server. (Some other web servers, like [[http://lighttpd.org/ lighttpd]], support similar functionality, but [[go.microsoft.com/fwlink/?LinkId=7001 IIS]] definitely does not.)
~1)Also, mod_rewrite must be enabled (not the case with with all hosted Apache systems)
~1)Finally, either .htaccess configuration must be allowed (//not the case on many hosted systems//) - because Wikka by default uses .htaccess files in directories to enable/disable URL rewiting - or you must have root access and be able to edit the Apache configuration (httpd.conf) directly (//only on dedicated servers or some virtual private/dedicated systems//).
===Configuration===
That's it. Notice the small change. We are just removing "wikka.php?wakka=" and then setting rewrite_mode to 1. **Note that the two configuration settings must always match** - if not, you'll end up with strange errors and pages not found.
Even if URL rewriting is used in Wikka, the long form of the URLs will continue working so you don't need to change any links with long URLs you may already have when switching to using mod_rewrite.
===Troubleshooting===
If after following the instruction above mod_rewrite is still not working, first make sure that Wikka is actually running on Apache. Creating a page with just %%(php)<?php phpinfo();?>%% and calling this page up in the browser will give a host of information about the environment PHP is running in.
If it is Apache, there are two possibile causes why mod_rewrite may not work: Either your web host does not have mod_rewrite configured so that you can use it, or .htaccess is ignored in directories. (You may try asking your host to enable both - if that doesn't work you'll have to do with long URLs.)
===Known issues===
Some Apache versions for Windows have a bug that will lowercase all URLs when using mod_rewrite; this is a [[ModRewriteDevelopment problem in Wikka specifically when creating new pages]]. We're looking into the possibility of creating a workaround for this.
Deletions:
ModrewriteInSubdirectoryWorkaround
[[ModRewriteDevelopment Development/Discussion]] >>Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.
That's it. Notice the small change. We are just removing "wikka.php?wakka=" and then setting rewrite_mode to 1.
If after following the instruction above mod_rewrite is still not working, there's only one possibility. Your web host does not have mod_rewrite configured so that you can use it.


Revision [7586]

Edited on 2005-04-25 20:06:07 by NilsLindenberg [layout]
Additions:
>>**See also**
ModrewriteInSubdirectoryWorkaround
Deletions:
>>See also: ModrewriteInSubdirectoryWorkaround


Revision [7582]

Edited on 2005-04-25 18:36:37 by NilsLindenberg [moved stuff to ModRewriteDevelopment + link]
Additions:
>>See also: ModrewriteInSubdirectoryWorkaround
[[ModRewriteDevelopment Development/Discussion]] >>Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.
CategoryDocumentation
Deletions:
>>See also: ModrewriteInSubdirectoryWorkaround>>Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.
===Maybe not as simple as it seems with Windows based servers?===
Typing "http://MyWikkaSite/WikkaPage" does not work and I have to type "http://MyWikkaSite/wikka.php?wakka=WikkaPage".
I have a windows 2K base, Apache+PhP+MySql and no trouble so far with my Wikka. As I fear I could have broke something with some additional code of mine, I tried a new setup from scratch and still have the problem.
Any idea where this could comes from? --ChristianBarthelemy
~& In Wikka, as distributed, the .htaccess file(s) take care of the rewriting, so if you want to use mod_rewrite, .htaccess //is// necessary - unless you copy the content into a section in httpd.conf (if you have root access). Without the appropriate mod-rewrite statements in either .htaccess or httpd.conf no rewriting will take place. -- JavaWoman
~~& the .htaccess file delivered with Wikka 1.1.5.3 is in the Wikka folder - still not working - I will try again later on...
~~~& Works just fine on my Windows development machine. There is no dependency with Windows - only with Apache itself. What //is// important though is that the Apache version used has mod_rewrite available (as module, or compiled into it). If you don't control the server (or don't have root access) ask your hosting provider is mod_rewrite is available. Has it worked before on your server? If so, was Apache upgraded to a new version, or reconfigured?
~~~~& You were right: only ""'AddModule mod_rewrite.c'"" was uncommented in the httpd.conf file while ""'LoadModule rewrite_module modules/mod_rewrite.so'"" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy
~~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the ""{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem? --ChristianBarthelemy
~~~~~~&Christian, I have no problems creating new pages with capitalized names as specified on my development system (""Win2K""/Apache/MySQL).---
~~~~~~~- ""http://[wikkadomain]/NewPage"" - tries to **load** ""NewPage"", finds it does not exist, and offers to create it; the page header shows the correct name
~~~~~~~- You can shortcut this by immediately adding /edit (to invoke the 'edit' handler) to the url and you get the to-be-created page immediately in **edit** mode: ""http://[wikkadomain]/NewPage/edit""
~~~~~~~- Using the form from the ""{{newpage}}"" **action** has the same result as the shortcut described above
~~~~~~& Note that your syntax above (""http://wikka.jsnx.com/ModRewrite/NewPage"") is not correct: this would be interpreted as applying a **handler** named '""NewPage""' (which is equivalent to 'newpage' to the ModRewrite page (such a handler does not exist); it should be ""http://wikka.jsnx.com/NewPage"" (or ""http://wikka.jsnx.com/NewPage/edit""). --JavaWoman
~~~~~- """http://135.1.1.227/wikka/NewPage/edit""" drives my system to create ""newpage"". It is likely to be an Apache settings problem and it is clearly linked with the mod_rewrite. I have the same problem whatever way I try to create ""NewPage"". Could this be be caused with my .htaccess file: %%
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
</IfModule>
%% I tried playing with [NC] but it didn't solve the problem.
~~~~~~&How is it "clearly linked with mod_rewrite"? What happens when you use the full URL """http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" ? What happens when you load an existing page using the full URL? I don't see anything in your .htaccess that would be related with lower-casing a URL or parts of it; can there be a settting elsewhere in your Apache? httpd.conf? --JavaWoman
~~~~~~~&"""http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" works fine even with mod_rewrite enabled. """http://135.1.1.227/wikka/wikka.php?wakka=ExistingPage""" displays the right page. I cannot detect anything not normal in my httpd.conf. :-(( --ChristianBarthelemy
~~~~~~~~&Did a bit of digging and Googling ... this behavior actually seems to be a known bug in Apache... see http://www.sitepoint.com/forums/archive/index.php/t-143070.html which I think matches your problem - as well as a suggested workaround. --JavaWoman
~~~~~~~~~&I also had the same problem! This was my workaround: The rewritten URLs are ""http://localhost/wikidir/NewPage"", and I put RewriteRule in the root directory, like this: %%(apache)RewriteRule ^wikidir/(.*)$ realwikidir/wikka.php?wakka=$1 [QSA,L]%% It seems that the Win32's mod_rewrite module lowercases only the texts before the first slash. If you use %%(apache)RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]%% with url ""http://localhost/NewPage/EdiT"" you have $_GET['wakka'] = "newpage/EdiT". --DotMG
~~~~~~~~~~&But "newpage/EdiT" would still give you "newpage" instead of """NewPage""" - so how is this a workaround? --JavaWoman
~~~~~~~~&I just found the SitePoint forums are no longer searchable or accessible without an account (free, but I didn't bother); here's another explanation of this bug: http://www.issociate.de/board/post/154198/%5Burl_rewrite%5D_uppercase_changed_to_lowercase.html . The bug was (later) fixed in Apache 2.0 but it remains in 1.3.x - see http://www.mailarchives.org/list/apache-httpd-bugs/msg/2004/02267 . --JavaWoman
CategoryDocumentation CategoryDevelopment


Revision [7581]

Edited on 2005-04-25 14:28:08 by JavaWoman [reply to DotMG]
Additions:
~~~~~~~~~~&But "newpage/EdiT" would still give you "newpage" instead of """NewPage""" - so how is this a workaround? --JavaWoman


Revision [7580]

Edited on 2005-04-25 14:23:23 by JavaWoman [reformat + reply to DotMG]
Additions:
~~~~~~~~~&I also had the same problem! This was my workaround: The rewritten URLs are ""http://localhost/wikidir/NewPage"", and I put RewriteRule in the root directory, like this: %%(apache)RewriteRule ^wikidir/(.*)$ realwikidir/wikka.php?wakka=$1 [QSA,L]%% It seems that the Win32's mod_rewrite module lowercases only the texts before the first slash. If you use %%(apache)RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]%% with url ""http://localhost/NewPage/EdiT"" you have $_GET['wakka'] = "newpage/EdiT". --DotMG
~~~~~~~~&I just found the SitePoint forums are no longer searchable or accessible without an account (free, but I didn't bother); here's another explanation of this bug: http://www.issociate.de/board/post/154198/%5Burl_rewrite%5D_uppercase_changed_to_lowercase.html . The bug was (later) fixed in Apache 2.0 but it remains in 1.3.x - see http://www.mailarchives.org/list/apache-httpd-bugs/msg/2004/02267 . --JavaWoman
Deletions:
~~~~~~~~~&I also had the same problem! This was my workaround: The rewritten URLs are ""http://localhost/wikidir/NewPage"", and I put RewriteRule in the root directory, like this:
RewriteRule ^wikidir/(.*)$ realwikidir/wikka.php?wakka=$1 [QSA,L]
It seems that the Win32's mod_rewrite module lowercases only the texts before the first slash.
If you use RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L], with url ""http://localhost/NewPage/EdiT"" you have $_GET['wakka'] = "newpage/EdiT". --DotMG


Revision [7576]

Edited on 2005-04-25 13:35:09 by DotMG [mod_rewrite lowercases the text before the first slash.]
Additions:
~~~~~~~~~&I also had the same problem! This was my workaround: The rewritten URLs are ""http://localhost/wikidir/NewPage"", and I put RewriteRule in the root directory, like this:
RewriteRule ^wikidir/(.*)$ realwikidir/wikka.php?wakka=$1 [QSA,L]
It seems that the Win32's mod_rewrite module lowercases only the texts before the first slash.
If you use RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L], with url ""http://localhost/NewPage/EdiT"" you have $_GET['wakka'] = "newpage/EdiT". --DotMG


Revision [6834]

Edited on 2005-03-22 06:58:55 by JavaWoman [adding link]
Additions:
>>See also: ModrewriteInSubdirectoryWorkaround>>Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.
Deletions:
Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.


Revision [6186]

Edited on 2005-02-20 11:34:13 by JavaWoman [further comment on Windows mod_rewrite problem]
Additions:
[[WikkaDocumentation Wikka Documentation]]
----
====Wikka and mod_rewrite====

Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.

Wikka works with mod_rewrite. And Wikka works without mod_rewrite.

During installation, Wikka will try to figure out if mod_rewrite is available. If Wikka does not detect mod_rewrite, it's possible to manually configure Wikka to use it after installation.

Follow this simple instruction:

- Edit wikka.config.php (found in the root directory of the Wikka installation). ---
Change these lines:
%%(php) "base_url" => "http://my.domain.com/wikka.php?wakka=",
"rewrite_mode" => "0", %%

to this:
%%(php) "base_url" => "http://my.domain.com/",
"rewrite_mode" => "1", %%

That's it. Notice the small change. We are just removing "wikka.php?wakka=" and then setting rewrite_mode to 1.

If after following the instruction above mod_rewrite is still not working, there's only one possibility. Your web host does not have mod_rewrite configured so that you can use it.
----

===Maybe not as simple as it seems with Windows based servers?===

Typing "http://MyWikkaSite/WikkaPage" does not work and I have to type "http://MyWikkaSite/wikka.php?wakka=WikkaPage".

I have a windows 2K base, Apache+PhP+MySql and no trouble so far with my Wikka. As I fear I could have broke something with some additional code of mine, I tried a new setup from scratch and still have the problem.
Any idea where this could comes from? --ChristianBarthelemy

~& In Wikka, as distributed, the .htaccess file(s) take care of the rewriting, so if you want to use mod_rewrite, .htaccess //is// necessary - unless you copy the content into a section in httpd.conf (if you have root access). Without the appropriate mod-rewrite statements in either .htaccess or httpd.conf no rewriting will take place. -- JavaWoman
~~& the .htaccess file delivered with Wikka 1.1.5.3 is in the Wikka folder - still not working - I will try again later on...
~~~& Works just fine on my Windows development machine. There is no dependency with Windows - only with Apache itself. What //is// important though is that the Apache version used has mod_rewrite available (as module, or compiled into it). If you don't control the server (or don't have root access) ask your hosting provider is mod_rewrite is available. Has it worked before on your server? If so, was Apache upgraded to a new version, or reconfigured?
~~~~& You were right: only ""'AddModule mod_rewrite.c'"" was uncommented in the httpd.conf file while ""'LoadModule rewrite_module modules/mod_rewrite.so'"" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy
~~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the ""{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem? --ChristianBarthelemy
~~~~~~&Christian, I have no problems creating new pages with capitalized names as specified on my development system (""Win2K""/Apache/MySQL).---
~~~~~~~- ""http://[wikkadomain]/NewPage"" - tries to **load** ""NewPage"", finds it does not exist, and offers to create it; the page header shows the correct name
~~~~~~~- You can shortcut this by immediately adding /edit (to invoke the 'edit' handler) to the url and you get the to-be-created page immediately in **edit** mode: ""http://[wikkadomain]/NewPage/edit""
~~~~~~~- Using the form from the ""{{newpage}}"" **action** has the same result as the shortcut described above
~~~~~~& Note that your syntax above (""http://wikka.jsnx.com/ModRewrite/NewPage"") is not correct: this would be interpreted as applying a **handler** named '""NewPage""' (which is equivalent to 'newpage' to the ModRewrite page (such a handler does not exist); it should be ""http://wikka.jsnx.com/NewPage"" (or ""http://wikka.jsnx.com/NewPage/edit""). --JavaWoman
~~~~~- """http://135.1.1.227/wikka/NewPage/edit""" drives my system to create ""newpage"". It is likely to be an Apache settings problem and it is clearly linked with the mod_rewrite. I have the same problem whatever way I try to create ""NewPage"". Could this be be caused with my .htaccess file: %%
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
</IfModule>
%% I tried playing with [NC] but it didn't solve the problem.
~~~~~~&How is it "clearly linked with mod_rewrite"? What happens when you use the full URL """http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" ? What happens when you load an existing page using the full URL? I don't see anything in your .htaccess that would be related with lower-casing a URL or parts of it; can there be a settting elsewhere in your Apache? httpd.conf? --JavaWoman
~~~~~~~&"""http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" works fine even with mod_rewrite enabled. """http://135.1.1.227/wikka/wikka.php?wakka=ExistingPage""" displays the right page. I cannot detect anything not normal in my httpd.conf. :-(( --ChristianBarthelemy
~~~~~~~~&Did a bit of digging and Googling ... this behavior actually seems to be a known bug in Apache... see http://www.sitepoint.com/forums/archive/index.php/t-143070.html which I think matches your problem - as well as a suggested workaround. --JavaWoman
----
Deletions:
[[WikkaDocumentation Wikka Documentation]]
----
====Wikka and mod_rewrite====

Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.

Wikka works with mod_rewrite. And Wikka works without mod_rewrite.

During installation, Wikka will try to figure out if mod_rewrite is available. If Wikka does not detect mod_rewrite, it's possible to manually configure Wikka to use it after installation.

Follow this simple instruction:

- Edit wikka.config.php (found in the root directory of the Wikka installation). ---
Change these lines:
%%(php) "base_url" => "http://my.domain.com/wikka.php?wakka=",
"rewrite_mode" => "0", %%

to this:
%%(php) "base_url" => "http://my.domain.com/",
"rewrite_mode" => "1", %%

That's it. Notice the small change. We are just removing "wikka.php?wakka=" and then setting rewrite_mode to 1.

If after following the instruction above mod_rewrite is still not working, there's only one possibility. Your web host does not have mod_rewrite configured so that you can use it.
----

===Maybe not as simple as it seems with Windows based servers?===

Typing "http://MyWikkaSite/WikkaPage" does not work and I have to type "http://MyWikkaSite/wikka.php?wakka=WikkaPage".

I have a windows 2K base, Apache+PhP+MySql and no trouble so far with my Wikka. As I fear I could have broke something with some additional code of mine, I tried a new setup from scratch and still have the problem.
Any idea where this could comes from? --ChristianBarthelemy

~& In Wikka, as distributed, the .htaccess file(s) take care of the rewriting, so if you want to use mod_rewrite, .htaccess //is// necessary - unless you copy the content into a section in httpd.conf (if you have root access). Without the appropriate mod-rewrite statements in either .htaccess or httpd.conf no rewriting will take place. -- JavaWoman
~~& the .htaccess file delivered with Wikka 1.1.5.3 is in the Wikka folder - still not working - I will try again later on...
~~~& Works just fine on my Windows development machine. There is no dependency with Windows - only with Apache itself. What //is// important though is that the Apache version used has mod_rewrite available (as module, or compiled into it). If you don't control the server (or don't have root access) ask your hosting provider is mod_rewrite is available. Has it worked before on your server? If so, was Apache upgraded to a new version, or reconfigured?
~~~~& You were right: only ""'AddModule mod_rewrite.c'"" was uncommented in the httpd.conf file while ""'LoadModule rewrite_module modules/mod_rewrite.so'"" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy
~~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the ""{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem? --ChristianBarthelemy
~~~~~~&Christian, I have no problems creating new pages with capitalized names as specified on my development system (""Win2K""/Apache/MySQL).---
~~~~~~~- ""http://[wikkadomain]/NewPage"" - tries to **load** ""NewPage"", finds it does not exist, and offers to create it; the page header shows the correct name
~~~~~~~- You can shortcut this by immediately adding /edit (to invoke the 'edit' handler) to the url and you get the to-be-created page immediately in **edit** mode: ""http://[wikkadomain]/NewPage/edit""
~~~~~~~- Using the form from the ""{{newpage}}"" **action** has the same result as the shortcut described above
~~~~~~& Note that your syntax above (""http://wikka.jsnx.com/ModRewrite/NewPage"") is not correct: this would be interpreted as applying a **handler** named '""NewPage""' (which is equivalent to 'newpage' to the ModRewrite page (such a handler does not exist); it should be ""http://wikka.jsnx.com/NewPage"" (or ""http://wikka.jsnx.com/NewPage/edit""). --JavaWoman
~~~~~- """http://135.1.1.227/wikka/NewPage/edit""" drives my system to create ""newpage"". It is likely to be an Apache settings problem and it is clearly linked with the mod_rewrite. I have the same problem whatever way I try to create ""NewPage"". Could this be be caused with my .htaccess file: %%
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
</IfModule>
%% I tried playing with [NC] but it didn't solve the problem.
~~~~~~&How is it "clearly linked with mod_rewrite"? What happens when you use the full URL """http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" ? What happens when you load an existing page using the full URL? I don't see anything in your .htaccess that would be related with lower-casing a URL or parts of it; can there be a settting elsewhere in your Apache? httpd.conf? --JavaWoman
~~~~~~~&"""http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" works fine even with mod_rewrite enabled. """http://135.1.1.227/wikka/wikka.php?wakka=ExistingPage""" displays the right page. I cannot detect anything not normal in my httpd.conf. :-(( --ChristianBarthelemy
----


Revision [4483]

Edited on 2005-01-11 19:32:36 by ChristianBarthelemy [Can't find anything wrong...]
Additions:
~~~~~~~&"""http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" works fine even with mod_rewrite enabled. """http://135.1.1.227/wikka/wikka.php?wakka=ExistingPage""" displays the right page. I cannot detect anything not normal in my httpd.conf. :-(( --ChristianBarthelemy


Revision [4480]

Edited on 2005-01-11 19:08:25 by JavaWoman [tab in code]
Additions:
"rewrite_mode" => "0", %%
"rewrite_mode" => "1", %%
Deletions:
"rewrite_mode" => "0", %%
"rewrite_mode" => "1", %%


Revision [4479]

Edited on 2005-01-11 19:07:45 by JavaWoman [code blocks -> php]
Additions:
%%(php) "base_url" => "http://my.domain.com/wikka.php?wakka=",
%%(php) "base_url" => "http://my.domain.com/",
Deletions:
%% "base_url" => "http://my.domain.com/wikka.php?wakka=",
%% "base_url" => "http://my.domain.com/",


Revision [4478]

Edited on 2005-01-11 19:05:14 by JavaWoman [some ?? for Christian]
Additions:
~~~~~~&How is it "clearly linked with mod_rewrite"? What happens when you use the full URL """http://135.1.1.227/wikka/wikka.php?wakka=NewPage/edit""" ? What happens when you load an existing page using the full URL? I don't see anything in your .htaccess that would be related with lower-casing a URL or parts of it; can there be a settting elsewhere in your Apache? httpd.conf? --JavaWoman


Revision [4453]

Edited on 2005-01-11 16:30:40 by ChristianBarthelemy [Any apache expert to check my rewrite rules?]
Additions:
~~~~~- """http://135.1.1.227/wikka/NewPage/edit""" drives my system to create ""newpage"". It is likely to be an Apache settings problem and it is clearly linked with the mod_rewrite. I have the same problem whatever way I try to create ""NewPage"". Could this be be caused with my .htaccess file: %%
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
</IfModule>
%% I tried playing with [NC] but it didn't solve the problem.


Revision [4451]

Edited on 2005-01-11 14:31:43 by JavaWoman [minor]
Additions:
~~~~~~&Christian, I have no problems creating new pages with capitalized names as specified on my development system (""Win2K""/Apache/MySQL).---
~~~~~~& Note that your syntax above (""http://wikka.jsnx.com/ModRewrite/NewPage"") is not correct: this would be interpreted as applying a **handler** named '""NewPage""' (which is equivalent to 'newpage' to the ModRewrite page (such a handler does not exist); it should be ""http://wikka.jsnx.com/NewPage"" (or ""http://wikka.jsnx.com/NewPage/edit""). --JavaWoman
Deletions:
~~~~~~&Christian, I have no problems creating new pages with capitalized names as specified on my development system (Win2K/Apache/MySQL).---
~~~~~~& Note that your syntax above (""http://wikka.jsnx.com/ModRewrite/NewPage"") is not correct: this would be interpreted as applying a **handler** named '""NewPage""' (which is equivalent to 'newpage' to the ModRewrite page (such a handler does not exist); it should be ""http://wikka.jsnx.com/NewPage"" (or ""http://wikka.jsnx.com/NewPage/edit"");


Revision [4449]

Edited on 2005-01-11 14:17:18 by JavaWoman [more precision in reply to ChristianBarthelemy]
Additions:
~~~~~~~- ""http://[wikkadomain]/NewPage"" - tries to **load** ""NewPage"", finds it does not exist, and offers to create it; the page header shows the correct name
~~~~~~~- You can shortcut this by immediately adding /edit (to invoke the 'edit' handler) to the url and you get the to-be-created page immediately in **edit** mode: ""http://[wikkadomain]/NewPage/edit""
Deletions:
~~~~~~~- ""http://[wikkadomain]/NewPage"" - tries to **load** NewPage, find it does not exist, and offers to create it; the page header shows the correct name
~~~~~~~- You can shortcut this by immediately adding /edit to the url and you get the to-be-created page in **edit** mode: ""http://[wikkadomain]/NewPage/edit""


Revision [4448]

Edited on 2005-01-11 14:15:32 by JavaWoman [reply to ChristianBarthelemy about new page creation]
Additions:
~~~~~~&Christian, I have no problems creating new pages with capitalized names as specified on my development system (Win2K/Apache/MySQL).---
~~~~~~~- ""http://[wikkadomain]/NewPage"" - tries to **load** NewPage, find it does not exist, and offers to create it; the page header shows the correct name
~~~~~~~- You can shortcut this by immediately adding /edit to the url and you get the to-be-created page in **edit** mode: ""http://[wikkadomain]/NewPage/edit""
~~~~~~~- Using the form from the ""{{newpage}}"" **action** has the same result as the shortcut described above
~~~~~~& Note that your syntax above (""http://wikka.jsnx.com/ModRewrite/NewPage"") is not correct: this would be interpreted as applying a **handler** named '""NewPage""' (which is equivalent to 'newpage' to the ModRewrite page (such a handler does not exist); it should be ""http://wikka.jsnx.com/NewPage"" (or ""http://wikka.jsnx.com/NewPage/edit"");


Revision [4447]

Edited on 2005-01-11 13:15:52 by ChristianBarthelemy [Question to JavaWoman]
Additions:
~~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the ""{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem? --ChristianBarthelemy
Deletions:
~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the ""{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem?


Revision [4446]

Edited on 2005-01-11 13:15:21 by ChristianBarthelemy [Question to JavaWoman]
Additions:
~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the ""{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem?
Deletions:
~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the "'{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem?


Revision [4445]

Edited on 2005-01-11 13:14:46 by ChristianBarthelemy [Question to JavaWoman]
Additions:
~~~~& So it works now, but I still have a strange problem when I try to create a new page by forcing the url to ""http://wikka.jsnx.com/ModRewrite/NewPage"" the system proposes me to create newpage instead of ""NewPage"". I get this problem with a brand new 1.1.5.3 and rewrite_mode on. It disapears if I remove the rewrite mode. I have the same symptom by using the "'{{newpage}}"" action. JavaWoman - as you also are using a windows/apache system could you please tell me if you have the same problem?


Revision [4237]

Edited on 2005-01-07 22:07:34 by IamBack [ypots]
Additions:
~~~& Works just fine on my Windows development machine. There is no dependency with Windows - only with Apache itself. What //is// important though is that the Apache version used has mod_rewrite available (as module, or compiled into it). If you don't control the server (or don't have root access) ask your hosting provider is mod_rewrite is available. Has it worked before on your server? If so, was Apache upgraded to a new version, or reconfigured?
Deletions:
~~~& Works just fine on my Windows development machine. There is no dependency with Windows - only with Apache itself. What //is// important though is that the Apache version used has mod_rewrite availabel (as module, or compiled into it). If you don't control the server (or don't have oot access) ask your hosting provider is mod-rewrite is available. Has it worked before on your server? If so, was Apache upgraded to a new version, or reconfigured?


Revision [4234]

Edited on 2005-01-07 20:08:57 by ChristianBarthelemy [ypots]
Additions:
~~~~& You were right: only ""'AddModule mod_rewrite.c'"" was uncommented in the httpd.conf file while ""'LoadModule rewrite_module modules/mod_rewrite.so'"" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy
Deletions:
~~~~& You were right: only ""AddModule mod_rewrite.c"" was uncommented in the httpd.conf file while ""LoadModule rewrite_module modules/mod_rewrite.so"" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy


Revision [4233]

Edited on 2005-01-07 20:08:10 by ChristianBarthelemy [ypots]
Additions:
~~~~& You were right: only ""AddModule mod_rewrite.c"" was uncommented in the httpd.conf file while ""LoadModule rewrite_module modules/mod_rewrite.so"" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy
Deletions:
~~~~& You were right: only "AddModule mod_rewrite.c" was uncommented in the httpd.conf file while "LoadModule rewrite_module modules/mod_rewrite.so" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy


Revision [4232]

Edited on 2005-01-07 20:07:35 by ChristianBarthelemy [You solved it - thanks JM]
Additions:
~~~~& You were right: only "AddModule mod_rewrite.c" was uncommented in the httpd.conf file while "LoadModule rewrite_module modules/mod_rewrite.so" was not activated. Thanks a lot. This new InlineCommentFormatter is really nice! --ChristianBarthelemy


Revision [4231]

Edited on 2005-01-07 19:46:10 by JavaWoman [reply to Christian]
Additions:
~~~& Works just fine on my Windows development machine. There is no dependency with Windows - only with Apache itself. What //is// important though is that the Apache version used has mod_rewrite availabel (as module, or compiled into it). If you don't control the server (or don't have oot access) ask your hosting provider is mod-rewrite is available. Has it worked before on your server? If so, was Apache upgraded to a new version, or reconfigured?


Revision [4228]

Edited on 2005-01-07 19:19:52 by ChristianBarthelemy [Refactoring of my problem using mod_rewrite with Windows]
Additions:
===Maybe not as simple as it seems with Windows based servers?===
Typing "http://MyWikkaSite/WikkaPage" does not work and I have to type "http://MyWikkaSite/wikka.php?wakka=WikkaPage".
I have a windows 2K base, Apache+PhP+MySql and no trouble so far with my Wikka. As I fear I could have broke something with some additional code of mine, I tried a new setup from scratch and still have the problem.
Any idea where this could comes from? --ChristianBarthelemy
~& In Wikka, as distributed, the .htaccess file(s) take care of the rewriting, so if you want to use mod_rewrite, .htaccess //is// necessary - unless you copy the content into a section in httpd.conf (if you have root access). Without the appropriate mod-rewrite statements in either .htaccess or httpd.conf no rewriting will take place. -- JavaWoman
~~& the .htaccess file delivered with Wikka 1.1.5.3 is in the Wikka folder - still not working - I will try again later on...


Revision [2991]

Edited on 2004-12-09 00:10:08 by JsnX [completely rewrote page]
Additions:
[[WikkaDocumentation Wikka Documentation]]
====Wikka and mod_rewrite====
Mod_rewrite translates URLs like http://wikka.jsnx.com/wikka.php?wakka=DotMG to http://wikka.jsnx.com/DotMG.
Wikka works with mod_rewrite. And Wikka works without mod_rewrite.
During installation, Wikka will try to figure out if mod_rewrite is available. If Wikka does not detect mod_rewrite, it's possible to manually configure Wikka to use it after installation.
Follow this simple instruction:
- Edit wikka.config.php (found in the root directory of the Wikka installation). ---
Change these lines:
%% "base_url" => "http://my.domain.com/wikka.php?wakka=",
"rewrite_mode" => "0", %%

to this:
%% "base_url" => "http://my.domain.com/",
"rewrite_mode" => "1", %%

That's it. Notice the small change. We are just removing "wikka.php?wakka=" and then setting rewrite_mode to 1.
If after following the instruction above mod_rewrite is still not working, there's only one possibility. Your web host does not have mod_rewrite configured so that you can use it.
Deletions:
[[HelpInfo Wikka Documentation]]
====Wikka and ""RewriteRules""====
Mod_rewrite translates URLs like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wikka.php?wakka=DotMG.
Mod_rewrite is not installed on all servers, so it's necessary to wrap the mod_rewrite directives in an "<""IfModule"" mod_rewrite.c>" in all .htaccess files containing mod_rewrite directives:
The .htaccess file in the root directory contains the following mod_rewrite code:
%%
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
</IfModule>%%
Directories that are accessed directly by client browsers, such as /css and /images, contain a .htaccess file with the following code:
%%
<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
%%


Revision [2491]

Edited on 2004-11-26 14:52:45 by JsnX [minor edit]
Additions:
Mod_rewrite translates URLs like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wikka.php?wakka=DotMG.
Deletions:
Mod_rewrite translates URLs like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wakka.php?wakka=DotMG.


Revision [2486]

Edited on 2004-11-26 13:48:09 by DarTar [Adding documentation links and category]
Additions:
[[HelpInfo Wikka Documentation]]
----
====Wikka and ""RewriteRules""====
----
CategoryDocumentation CategoryDevelopment
Deletions:
%%


Revision [2483]

Edited on 2004-11-26 13:24:16 by JsnX [show current usage, and slight rewording]
Additions:
Mod_rewrite translates URLs like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wakka.php?wakka=DotMG.

Mod_rewrite is not installed on all servers, so it's necessary to wrap the mod_rewrite directives in an "<""IfModule"" mod_rewrite.c>" in all .htaccess files containing mod_rewrite directives:

The .htaccess file in the root directory contains the following mod_rewrite code:
</IfModule>%%
Directories that are accessed directly by client browsers, such as /css and /images, contain a .htaccess file with the following code:
RewriteEngine off
</IfModule>
%%
Deletions:
ModRewrite is the funny way to translate URL like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wakka.php?wakka=DotMG. In some servers, this module isn' t installed, so wikka doesn' t run perfectly.
To make wikka compatible, use ""IfModule"" mod_rewrite.c in **all** .htaccess files containing Rewrite directive:
</IfModule>%%


Revision [2478]

Edited on 2004-11-26 12:50:48 by JsnX [updated to reflect actual implementation]
Additions:
ModRewrite is the funny way to translate URL like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wakka.php?wakka=DotMG. In some servers, this module isn' t installed, so wikka doesn' t run perfectly.
To make wikka compatible, use ""IfModule"" mod_rewrite.c in **all** .htaccess files containing Rewrite directive:
%%
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
Deletions:
ModRewrite is the funny way to translate URL like http://wikka.jsnx.com/DotMG to http://wikka.jsnx.com/wakka.php?wakka=DotMG. In some servers, this module isn' t installed, so wikka doesn' t run perfectly.
To make wikka compatible, use ""IfModule"" mod_rewrite.c in **all** .htaccess files containing Rewrite directive:
%%
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ /wakka.php?wakka=$1


Revision [634]

Edited on 2004-06-15 08:21:44 by DotMG [updated to reflect actual implementation]
Additions:
To make wikka compatible, use ""IfModule"" mod_rewrite.c in **all** .htaccess files containing Rewrite directive:
%%
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ /wakka.php?wakka=$1
</IfModule>%%
Deletions:
To make wikka compatible, use ""IfModule"" mod_rewrite.c in .htaccess files :
""<IfModule mod_rewrite.c>""
""RewriteEngine On""
""RewriteRule ^(.*)$ /wakka.php?wakka=$1""
""</IfModule>""


Revision [381]

Edited on 2004-05-25 00:27:20 by natpool-65-39-13-99.lakeheadu.ca [updated to reflect actual implementation]
Additions:
""<IfModule mod_rewrite.c>""
""RewriteEngine On""
""RewriteRule ^(.*)$ /wakka.php?wakka=$1""
""</IfModule>""
Deletions:
""<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ /wakka.php?wakka=$1
</IfModule>""


Revision [380]

Edited on 2004-05-25 00:26:11 by natpool-65-39-13-99.lakeheadu.ca [updated to reflect actual implementation]
Additions:
To make wikka compatible, use ""IfModule"" mod_rewrite.c in .htaccess files :
Deletions:
To make wikka compatible, use IfModule mod_rewrite.c in .htaccess files :


Revision [379]

Edited on 2004-05-25 00:25:40 by natpool-65-39-13-99.lakeheadu.ca [updated to reflect actual implementation]
Additions:
""<IfModule mod_rewrite.c>
</IfModule>""
Deletions:
<IfModule mod_rewrite.c>
</IfModule>


Revision [348]

The oldest known version of this page was created on 2004-05-23 08:50:21 by DotMG [updated to reflect actual implementation]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki