Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
Redirection to from dokuwiki page to specific domain subpage
Avatar
Tattoofreak #1
Member since May 2018 · 19 posts
Group memberships: Members
Show profile · Link to this post
Subject: Redirection to from dokuwiki page to specific domain subpage
I am wondering if this is possible somehow:

I have setup a dokuwiki instance where some pages are set as private and some pages are set as public.
To be more clear:

+-mainpage (private)
   |
   +subpage (private)
   |
   +subpage (private)
   |  |
   |  +subpage (public)
   |
   +subpage (private)

Now as the main page is set as private therefore users cannot navigate through the page tree starting from the main page. They have to know the direct link to that specific public page which is not very practicable.
Is there a way to set a domain subpage as a custom name (myDomain.com/myCustomName) and redirect this one directly to that public dokuwiki page?
This post was edited on 2019-02-19, 07:52 by Tattoofreak.
Avatar
cziehr #2
Member since Jan 2011 · 579 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
I don‘t think this is possible with DokuWiki.

Maybe you can create a rewrite rule in htaccess which does the redirect in case you are using Apache (Other webservers have similar tools.).
Avatar
Tattoofreak #3
Member since May 2018 · 19 posts
Group memberships: Members
Show profile · Link to this post
I am using apache and I already thought about this but I don't know if it's possible to do a redirection onto a PHP engine like dokuwiki is using?
Avatar
cziehr #4
Member since Jan 2011 · 579 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
It doesn't matter if you're using pure HTML, PHP oder whatever. In an htaccess-rewrite, you define from which URL to which URL the user should be redirected, so it doesn't matter which technology you're using.
Avatar
Tattoofreak #5
Member since May 2018 · 19 posts
Group memberships: Members
Show profile · Link to this post
Okay, thanks a lot!
I'll give it a shot and then report back when I got any news about this.
Avatar
Tattoofreak #6
Member since May 2018 · 19 posts
Group memberships: Members
Show profile · Link to this post
OK, finally I've got the solution.
For the mentioned example above do the following steps:

1. On webserver's filesystem create an empty folder called myCustomName

2. Open the Apache's .htaccess file and add the following content:

RewriteEngineOn
RewriteRule ^myCustomName https://myDokuWikiURL

That's it. Now people can get directly to my specific DokuWiki page by just entering myDomain.com/myCustomName without having a complex URL.
This post was edited 2 times, last on 2019-02-19, 14:47 by Tattoofreak.
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: 2019-06-25, 22:16:59 (UTC +02:00)