I'm using mod-rewrite without problems to rewrite long url's on TikiWiki based CMS sites (http://tikiwiki.org), with single or multitiki installation from the same folder in the file tree on the server, each of them configured with a different domain using virtual hosts (http://domain.com , http://whatever.domain.com , http://www.anotherdomain.com , ...)
All of them rely on the installation on /home/httpd/tiki19dns/
However, when I install multitikis as subdirectories (http://www.domain.com/site1/ , http://www.domain.com/site2/ , http://www.domain.com/site3/ ...), and being the installation on /home/httpd/tiki19/ , url's are not rewritten properly.
Apache gets the url from /etc/apache/httpd.conf , which contains:
- Code: Select all
Alias /site1 "/home/httpd/tiki19"
<Directory "/home/httpd/tiki19">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /site2 "/home/httpd/tiki19"
<Directory "/home/httpd/tiki19">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /site3 "/home/httpd/tiki19"
<Directory "/home/httpd/tiki19">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
On that directory under the file tree I put the .htaccess file.
(/home/httpd/tiki19/.htaccess)
This file contains:
("site1" is called "cursos" in our file)
- Code: Select all
<FilesMatch "\.(bak|inc|lib|sh|tpl)$">
order deny,allow
deny from all
</FilesMatch>
<Limit GET POST PUT DELETE>
order deny,allow
allow from all
</Limit>
<IfModule mod_rewrite.c>
RewriteEngine On
# direct one-word access
RewriteRule ^articles$ /cursos/tiki-view_articles.php [L]
RewriteRule ^blogs$ /cursos/tiki-list_blogs.php [L]
RewriteRule ^categories$ /cursos/tiki-browse_categories.php [L]
RewriteRule ^charts$ /cursos/tiki-list_charts.php [L]
RewriteRule ^chat$ /cursos/tiki-chat.php [L]
RewriteRule ^contact$ /cursos/tiki-contact.php [L]
RewriteRule ^directories$ /cursos/tiki-directory_browse.php [L]
RewriteRule ^eph$ /cursos/tiki-eph.php [L]
RewriteRule ^faqs$ /cursos/tiki-list_faqs.php [L]
RewriteRule ^files$ /cursos/tiki-file_galleries.php [L]
RewriteRule ^forums$ /cursos/tiki-forums.php [L]
RewriteRule ^images$ /cursos/tiki-galleries.php [L]
RewriteRule ^galleries$ /cursos/tiki-galleries.php [L]
RewriteRule ^games$ /cursos/tiki-list_games.php [L]
RewriteRule ^my$ /cursos/tiki-my_tiki.php [L]
RewriteRule ^newsletters$ /cursos/tiki-newsletters.php [L]
RewriteRule ^quizzes$ /cursos/tiki-list_quizzes.php [L]
RewriteRule ^stats$ /cursos/tiki-stats.php [L]
RewriteRule ^surveys$ /cursos/tiki-list_surveys.php [L]
RewriteRule ^trackers$ /cursos/tiki-list_trackers.php [L]
RewriteRule ^irc$ /cursos/tiki-irc_logs.php [L]
RewriteRule ^sheets$ /cursos/tiki-sheets.php [L]
RewriteRule ^workspaces$ /cursos/tiki-workspaces_admin.php [L]
# access any object by its numeric identifier
RewriteRule ^article([0-9]+) /cursos/tiki-read_article.php?articleId=$1 [QSA,L]
RewriteRule ^art([0-9]+) /cursos/tiki-read_article.php?articleId=$1 [QSA,L]
RewriteRule ^blog([0-9]+) /cursos/tiki-view_blog.php?blogId=$1 [QSA,L]
RewriteRule ^chart([0-9]+) /cursos/tiki-view_chart.php?chartId=$1 [QSA,L]
RewriteRule ^cat([0-9]+) /cursos/tiki-browse_categories.php?parentId=$1 [QSA,L]
RewriteRule ^categ([0-9]+) /cursos/tiki-browse_categories.php?parentId=$1 [QSA,L]
RewriteRule ^directory([0-9]+) /cursos/tiki-directory_browse.php?parent=$1 [QSA,L]
RewriteRule ^eph([0-9]+) /cursos/tiki-directory_browse.php?parent=$1 [QSA,L]
RewriteRule ^faq([0-9]+) /cursos/tiki-view_faq.php?faqId=$1 [QSA,L]
RewriteRule ^file([0-9]+) /cursos/tiki-list_file_gallery.php?galleryId=$1 [QSA,L]
RewriteRule ^dl([0-9]+) /cursos/tiki-download_file.php?fileId=$1 [QSA,L]
RewriteRule ^forum([0-9]+) /cursos/tiki-view_forum.php?forumId=$1 [QSA,L]
RewriteRule ^poll([0-9]+) /cursos/tiki-poll_results.php?pollId=$1 [QSA,L]
RewriteRule ^vote([0-9]+) /cursos/tiki-poll_form.php?pollId=$1 [QSA,L]
RewriteRule ^img([0-9]+) /cursos/tiki-show_image.php?id=$1 [QSA,L]
RewriteRule ^image([0-9]+) /cursos/tiki-browse_image.php?imageId=$1 [QSA,L]
RewriteRule ^gallery([0-9]+) /cursos/tiki-browse_gallery.php?galleryId=$1 [QSA,L]
RewriteRule ^gal([0-9]+) /cursos/tiki-browse_gallery.php?galleryId=$1 [QSA,L]
RewriteRule ^newsletter([0-9]+) /cursos/tiki-newsletters.php?nlId=$1 [QSA,L]
RewriteRule ^quiz([0-9]+) /cursos/tiki-take_quiz.php?quizId=$1 [QSA,L]
RewriteRule ^survey([0-9]+) /cursos/tiki-take_survey.php?surveyId=$1 [QSA,L]
RewriteRule ^tracker([0-9]+) /cursos/tiki-view_tracker.php?trackerId=$1 [QSA,L]
RewriteRule ^irc([0-9]+) /cursos/tiki-irc_logs.php?focus=$1 [QSA,L]
RewriteRule ^demo([0-9]+) /cursos/tiki-demo.php?demoId=$1 [QSA,L]
RewriteRule ^decide([0-9]+) /cursos/tiki-demo.php?demoId=$1 [QSA,L]
RewriteRule ^int([0-9]+) /cursos/tiki-integrator.php?repID=$1 [QSA,L]
RewriteRule ^sheet([0-9]+) /cursos/tiki-view_sheets.php?sheetId=$1 [QSA,L]
RewriteRule ^ws([0-9]+) /cursos/tiki-workspaces_desktop.php?workspaceId=$1 [QSA,L]
# todo add support for all characters allowed in a Wiki name
# make sure this is the last rule!
RewriteRule ^show:(~?)([-_\+A-Za-z0-9]+)$ /cursos/tiki-slideshow.php?page=$1$2 [QSA,L]
RewriteRule ^(~?)([-_\+A-Za-z0-9]+)$ /cursos/tiki-index.php?page=$1$2 [QSA,L]
#for multi-byte char support use
RewriteRule ^([^a-z]+)([^\/]+)([^tki-]+)(.*[^.js]+)(~?)(.*)$ /cursos/tiki-index.php?page=$1$2$3$4$5$6$7$8$9 [QSA,L]
</IfModule>
Url of the site is:
http://moviments.net/cursos
And url's are not being rewritten properly.
Any hints on how to achieve that url's are rewritten properly?
On the contrary, on the main site of our server:
http://moviments.net
url's are rewritten properly with a similar .htaccess file (without the "cursos/" part, of course)[/code]