Hi All,
i’ve been struggling with this problem and need the community’s help. In my site MODx is installed in the /htddocs/modx subdicrectory to accommodate other non-modx modules. However, currently I see www.sitedomain.com/modx/page.html for all pages(except home). Instead it i’d like to see www.sitedomain.com/page.html.
The friendly URLs are on and working but keep including the /modx/ like so: www.sitedomain.com/modx/page.html. So I assume they get it from the basepath. Is there a way to manually change the basepath to force FURL to generate www.sitedomain.com/page.html so i can handle everything else with some modrewrite rules?
If changing the basepath is not the way to go, what is?
Any help would be greatly appreciated.
-
☆ A M B ☆
- 2,213 Posts
Take a look at this:
http://tips-scripts.com/pointing I don’t know if it will solve your problem or not, but it should get you going in the right direction.
AMDbuilder
Thanks AMDBuilider,
that’s good information. Unfortunately the main problem is in the fact that the MODx generated friendly URLs already include /mods/ in them. So when a user clicks on that link the url displayed in the browser’s address bar already includes /modx/. That is what i’m trying to prevent.
There’s some code in the index.php that sets the site’s base path, but i have not been able to find where to set basepath to override that dynamic setting.
Anybody?
-
☆ A M B ☆
- 2,213 Posts
I was thinking if you used the one link and then changed the htaccess to reflect the desired path it should work. Untested, but it might work.
AMDbuilder
I think that if you want /htddocs/modx to be the root directory on your host you will need to edit the httpd.conf (apache configuration file) to define this. Usually httpdocs is the root. The path that is being set dynamically is the path that the host thinks is the root path.
That’s what we ended up doing. We moved MODx into the web root, which produced the desired effect, i.e. removed /modx/ from the url. Then in order to accommodate our external modules we created svn:externals links from all external modules into MODx folder tree, which gave us what we ultimately wanted: a one click checkout/deployment from our SVN master repository to the developers working copies or into production.
Thanks to all who helped.
The answer seems to be the following: there is no easy way to manually change MODx base path to something other than it’s real path in relationship to the web root.