Loading...
 
Skip to main content

Features / Usability


Apache Config issue: VirtualHost Wiki URL Adding Backslash in Firefox

I have set up two wikis on my WAMP server, essentially as follows:

C:WAMP/www/wiki_1
C:WAMP/www/wiki_2

To handle getting users to the right place, I have changed the Apache config so that the following was added:

Image
Copy to clipboard
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:WAMP/www/wiki_1" ServerName prefix.myurl.com </VirtualHost> <VirtualHost *:80> DocumentRoot "C:WAMP/www/wiki_2" ServerName prefix.myotherurl.com </VirtualHost>


This mostly works, except when you login. That is, unauthorized users get the login page, and then when they login they get the following:

In Firefox (note the backslash after the domain name)
   http://prefix.myotherurl.com\/tiki-index.php?page=Home+Page

In IE (note the doubled forward slash after the domain name)
   http://prefix.myotherurl.com//tiki-index.php?page=Home+Page


DOES ANYONE have an idea where the configuration may be going wrong or why tikiwiki appears to be adding an additional slash in the relative URL?

NOTE: if the backslash is removed after the successful login, everything works fine from there on...

Thanks for any suggestions!

I am having this same issue. Anyone know why and how we can fix this? Thanks in advance.

JoeR,
I am currently trying to figure how to possibly use redirectmatch to do a replace or set a rewrite rule but I am more the information manager than the programmer or IT guy...So far restarting services is choking on my regular expressions as it will not come up...obviously my syntax and/or implementation is wrong. But maybe it is a potential solution...and maybe you know more about it than I do?


thebookdoc, Unfortunately, I'm no expert either. I have reverted to just using MS Internet Explorer, as it seems to handle the extra slash.

Again please, does anyone have any ideas how to resolve this issue. I am using a standard WAMP install with a single Tikiwiki. Both are latest downloads available at 18/12/08. Installed on a WinXP box.

Thanks again for any ideas or help anyone may have.

JoeR,
It took a few days, but I have found my issue, and it could as likely be yours. I am using the Group Homepage feature, and Virtualhosts on my WAMP. It seems that in assembling the URLs when you name a page rather than enter a full URL, you get the strange result. I have changed my URLs for the group homepages to full URLs rather than page names and the issue is gone. I consider it a bug...but I'm not sure where to post it.


In a related issue that is not seemingly as easy to solve, logging in with an incorrect username or password yeilds the invalid username link, which works in IE (becasue it has two forward slashes after the domain) and not in firefox (which has a backslash and forward slash)...so the issue still exists and seems to be caused by how the URL is being created. But in IE:

http://domain.com//tiki-error.php?error=Invalid+usernameQuestion

in Firefox:

http://domain.com\/tiki-error.php?error=Invalid+usernameQuestion

I'd be glad for any additional insight!


I can fix this by changing a line in the tiki-login.php page:

$url = 'http://domain.com/'.'tiki-error.php?error='.urlencode($error);

but I am not sure why URI definition is not already handled in that code!

perhaps even less obscure, just set the base_url in the same php file...

$base_url = 'http://domain.com/';

WHERE IS THIS VALUE SUPPOSED TO COME FROM??