Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Rewriting issue
Avatar
katkota #1
Member since Mar 2010 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: Rewriting issue
Hello folks;
i'm having issue using the rewriting rule on my dokuwiki installation. I'm trying to change this ugly link "http://isd-imdserver/dokuwiki/doku.php/start" to something friendly like "imdwiki" so users can remember easy.
I want users to be able to type "imdwiki" in their browser and that leads them to the full link.
I followed the instructions in the rewriting and changed the Nice URL to use ".htaccess" and also edited the ".htaccess" and edited "/conf/local.php" to make the rewrite rule 2 per instructions but i'm still couldn't get it to work when i type "http://imdwiki" in the browser.

My dokuwiki folder is this: /var/www/html/dokuwiki
I created a soft link to the dokuwiki folder above to imdwiki

Any help with this would be great.

Here's my ".htaccess":

## Enable this to restrict editing to logged in users only

## You should disable Indexes and MultiViews either here or in the
## global config. Symlinks maybe needed for URL rewriting.
#Options -Indexes -MultiViews +FollowSymLinks

## make sure nobody gets the htaccess, README, COPYING or VERSION files
<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
    <IfModule mod_authz_host>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_host>
        Order allow,deny
        Deny from all
    </IfModule>
</Files>

## Don't allow access to git directories
<IfModule alias_module>
    RedirectMatch 404 /\.git
</IfModule>

## Uncomment these rules if you want to have nice URLs using
## $conf['userewrite'] = 1 - not needed for rewrite mode 2
RewriteEngine on
RewriteBase /imdwiki
#
RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php
#
## Not all installations will require the following line.  If you do,
## change "/dokuwiki" to the path to your dokuwiki directory relative
## to your document root.
#RewriteBase /dokuwiki
#
## If you enable DokuWikis XML-RPC interface, you should consider to
## restrict access to it over HTTPS only! Uncomment the following two
## rules if your server setup allows HTTPS.
#RewriteCond %{HTTPS} !=on
#RewriteRule ^lib/exe/xmlrpc.php$      https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
Avatar
katkota #2
Member since Mar 2010 · 16 posts
Group memberships: Members
Show profile · Link to this post
Any answer folks?
Avatar
schplurtz (Moderator) #3
Member since Nov 2009 · 264 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Hi,

Quote by katkota:
I'm trying to change this ugly link "http://isd-imdserver/dokuwiki/doku.php/start" to something friendly like "imdwiki"
It seems there is some confusion here. I will try to clarify. Going from http://isd-imdserver/dokuwiki/doku.php/start to http://imdwiki/start involves 3 different and independent settings. solve them one at a time

If you want to change the server name, ie be able to type "http://imdwiki/..." instead of "http://isd-imdserver/...", This is a DNS issue (or any other name-to-IP mecanism you may use), not something DokuWiki or your web server can do. DNS setting issues are beyond the scope of this forum.

RewriteBase, in certain conditions, can help to rewrite the /dokuwiki part of your URL to something else, including nothing. But it is probably easier to move files in the correct folder to get the desired effect. Ie, if you want http://yourserver/doku.php/start instead of http://yourserver/dokuwiki/doku.php/start move all the files from /whereever/your/files/are/installed/dokuwiki to /whereever/your/files/are/installed.

If you want to get rid of doku.php in the URL, (ie go from http://.../doku.php/start to http://.../start) then use .htaccess file and configure Doku accordingly.

/Schplurtz
http://schplurtz.free.fr/wiki/
Avatar
katkota #4
Member since Mar 2010 · 16 posts
Group memberships: Members
Show profile · Link to this post
Thanks schplurtz
I'm trying to make it easier so users don't have to remember the full link. i want users to write something simple in the browser like "http://imdwiki" and that redirect them to the start page of "http://isd-imdserver/dokuwiki/doku.php/start".

I checked with our networking team and they said our DNS can't do it. so i'm trying to find a way to get it done.
Avatar
andi (Administrator) #5
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by katkota:
I checked with our networking team and they said our DNS can't do it. so i'm trying to find a way to get it done.

I guess your network team is a bit incompetent or just lazy. But you're probably out of luck without their help.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
MartinR #6
Member since Jul 2015 · 95 posts · Location: UK
Group memberships: Members
Show profile · Link to this post
If your users are using *nix machines, then set /etc/hosts to have the line:
123.45.67.89  imdwiki

If they are still using Winboxes then there is an equivalent file C:\Windows\system32\drivers\etc\hosts, or something similar depending upon which flavour you have.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-09-20, 11:09:03 (UTC +02:00)