I’ve tried searching around but every example I tried made no difference.
I have a site which is setup like this www.domain.com/~sitename/
All I want to do is to remove the ~sitename from page requests, [[++site_url]] for instance puts this ~sitename back into urls so internal weblinks are broken, well not totally broken, they work but I need to just remove that ~sitename. Also in the manager anything with a ~ in the address bar breaks phpthumb so my client can’t see the thumbnails.
-
☆ A M B ☆
- 24,524 Posts
From my understanding of .htaccess, you won’t be able to do it that way; you need to reverse your approach. Pages need to actually be requested with the ~sitename part, since that is how Apache can find the pages. So the .htaccess would be used to add /~sitename to all page requests. Removing it from all links and URLs would be the job of MODx, just as friendly URLs is handled internally by MODx (and the .htaccess converts the URL to the expected index.php?... URL). I would just use a plugin to remove it before rendering the page. (in Evo, that would use the onPagePrerender event).