Loading...
 
Skip to main content

Features / Usability


url rewite and url prefix

I have rewrite rules running on a dev tiki but as the browser thinks it is running in a subdirectory all relative links are broken:

http://localhost/tiki-index.php?page=ExampleQuestion
works fine as the scrips are in this folder

http://localhost/tiki-index.php/ExampleQuestion
fails badly as the browser looks for stuff in the Example dir

I have tried setting the HTTP URL prefix: to http://localhost/Question but any value in this box seems to make no difference to anything. I can’t even seem to break stuff more with this!

So question is. Should I set the url prefix to solve my problem?
If so any ideas on why the prefix is ineffective?

Whoops!

Image
Copy to clipboard
RewriteRule ^([-_\+A-Za-z0-9]+)$ /tiki-index.php?page=$1 [QSA,L]


Seems to work when a wiki is accessed via http://localhost/ExampleQuestion

However I would like to try and get some existing code working that uses http://localhost/Example/page2Question

I have it woking except all the links point non existent stuff in http://localhost/Example/page2/Question
This includes all the CSS bits.

I am trying to use HTTP URL prefix: to get around this but it seems to do nothing, have I got the wring idea of what it does?

I am running tikiwiki-1.9.2 and tried a clean install.


> I have rewrite rules running on a dev tiki but as the browser thinks it is running in a subdirectory all relative links are broken:
>
> http://localhost/tiki-index.php?page=ExampleQuestion
> works fine as the scrips are in this folder
>
> http://localhost/tiki-index.php/ExampleQuestion
> fails badly as the browser looks for stuff in the Example dir
>
> I have tried setting the HTTP URL prefix: to http://localhost/Question but any value in this box seems to make no difference to anything. I can’t even seem to break stuff more with this!
>
> So question is. Should I set the url prefix to solve my problem?
> If so any ideas on why the prefix is ineffective?
>
You may want to research "base href"
-Tagg