Hello MODx developers,
I am using MODx revolution. I have just transferred site from one domain to another. as it was a IP based server i have created virtual host with the same name it had previously.
On previous server the files were located at the root but in new server files are located at tab3, so i have created virtual host that points inside that directory. ie. I have all files in modx/ dir so my virtual host config set to /var/www/modx/
Now the problem is whenever i open home page as well as subdomains (contexts) it works and shows the page but when i open any internal links it says 404 page
Ex : if i open www.abc.com => It works
but when i open www.abc.com/contacts => It doesnt works
I see its issue with .htaccess because
1) if i remove htaccess
all the subdomains and domains works perfect but inner links like "abc.com/contact" doesnt open up and says 404
2) If i add it again only the main domain and its inner links open...no subdomain or inner links of subdomain works
DO i need to add/remove something from htaccess ??
[ed. note: amitpatil last edited this post 14 years, 2 months ago.]
Make sure you have this in the <head> section of all your templates:
<base href="[[!++site_url]]" />
And make sure that you have a context setting for each context with the correct settings for these:
site_url
base_url
http_host
yes its there....and i have settings for site_url, base_url and http_host too
i also checked .htaccess file its also same as provided in setup
-
MODX Staff
- 2,502 Posts
Did you set these:
site_url
base_url
http_host
for the Web context? From what I understand it too must be edited when using subdomains.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
@Bob and @jay : That was the problem....its wroking now.
Many thanks guys for helping out.
I'm glad you got it sorted. Thanks for reporting back.