I have two directory in my root, one contains modx and one another site (that is also a subdomain)... how can this work with frendly urls?
Everything works fine in the modx subdirectory, but how can I redirect ONLY the url that start with /myOtherSite/ on that subdir?
i.e., i want this
www.mysite.com/foo.html -> www.mysite.com/modx/foo.html
www.mysite.com/theOtherSite/bar.html -> www.mysite.com/theOtherSite/bar.html
theOtherSite.mysite.com/bar.html -> www.mysite.com/theOtherSite/bar.html (this worked if i do not change the .htaccess of the root directory)
Daniele "MadMage" Calisi
-
MODX Staff
- 10,725 Posts
@madmage: you should be able to simply put the rewrite rules into an htaccess in the /modx subdirectory -- that will then only be engaged if the request begins with /modx/ -- just remember to modify the rule to include the subdirectory path as indicated in the included ht.access
thanks a lot, TobyL... the problem with your solution is that index.php points to /modx/index.php, but I want to hide that directory to the world (this is one of the reasons I wanna use mod_rewrite)
but if I write /index.php, the browser stops for infinite redirections
Daniele "MadMage" Calisi
-
MODX Staff
- 10,725 Posts
I don’t understand the problem here. Madmage, what are you trying to accomplish? If you don’t want /modx in your URL, simply move the modx index.php and all modx subfolders to the root level. Why did you install modx under /modx if you want /modx not to show in the URL’s?