Any .htaccess gurus out there?


Well-known member
We're splitting up some stuff on our VPS and moving it to a new vps. On the odl VPS, we run this package in a sub-folder of the domain (i.e.

The new domain has it as a subdomain (i.e. However, we run an add-on that synchronises XenForo and the wiki logins for us, which requires the files to reside in specific folders.

Hence, the files on the existing VPS are in, with /w working out to /wiki. How would we be able to set the same up in the new VPS so it would automatically go int o a /w folder on it, while the URL itself would not be altered?


Files are in, but the URL shown should just be

Thanks in advance :)


Active member
if you look at how .htaccess works you´ll realize very fast that is not the way to do it spec. if you own a vps- or root server.
so better do the settings in the related v-host wich can be done with just normal std. admin knowledge.


Well-known member
If you own the VPS, you can point the subdomain to whatever directory in the filesystem. That would work best here. If the VPS use Apache, you can use something like this

<VirtualHost *:80>
DocumentRoot "/path/to/your/w/directory"
Good luck!


Well-known member
Thanks for everyone's help so far. I'm still facing some issues, though :(

Navigating to for some odd reason takes me to Note the capital W.

The folder the wiki is in is /w

This is in my vhost.conf:

Alias / /var/www/vhosts/
php_admin_value open_basedir "/"
And my .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /$1 [L]
Thw uppercase /W seems to be MediaWiki software translating the /w to uppercase, rather than just using /w/index.php to get me to the right page.

I've been staring at this for hours now, and still haven't figured it out. I tried several options, but really cannot get further.

Perhaps a new pair of eyes will spot where things go wrong?

Thanks in advance :) I'll reward whoever gives the final nudge :)


Formerly CyclingTribe
I'm thinking it might be easier to setup the "wiki" subdomain as a separate "site" rather than alias it - I do this with several subdomains for my web directory and it works very well.

What web server are you using?


Well-known member
We're using Apache on CentOS.

At this moment, I'm ready to try anything, really. I've spent hours trying to use different settings, and am unfortunately none the wiser :(


Formerly CyclingTribe
Okay, PM me with the Apache .conf for your main site; I think it'll be better if we try to run the wiki subdomain as a separate Apache "site" - so I'll try and help you build the separate conf file for it. (y)