Using Modx 2.8.1, I am running a website on this url as root element / homepage: mypage.com/myhomepage
I was asked to add further subpages which should be accessible like this: mypage.com/myhomepage/subpage1, mypage.com/myhomepage/subpage2 and so on.
Ever since I create these subpages and prepared everything for friendly urls, once I open these subpages, I will be redirected to mypage.com for some strange reason.
the status of the subpages is “published”
I cant access the page neither by directly typing the url to the browser manually nor by clicking the “preview” button in modx
modx error log does not contain any error
all affected subpages contain the neccessary meta tag: <base href="[[!++site_url]]" />
I cleared the cache several times
as for modx settings, I set “friendly_urls” and “use_alias_path” to yes
this is everything my .htaccess file in root contains:
I forgot to mention that “use_alias_path” was already set to yes (updated my question).
Apart from that, you are right, assuming that modx is installed in a folder called “myhomepage”. I updated the .htaccess file accordingly (RewriteBase /myhomepage/) but still get the same error.
In the database table modx_site_content check the column uri to see if the content is correct.
Try if it works when you call the page mypage.com/myhomepage/index.php?q=subpage1.html, where you add the value from the uri column as the request parameter q. If that works, then the problem is the .htaccess file.
Yes, it is.
I got it working now, meaning, I can access the subpage by manually typing the url to the browser (mypage.com/myhomepage/subpage1) but still not by using the preview button in Modx!? Good enough for now, yet, it would be interesting to know whats still crashing the preview button.
Unfortunately, I can’t tell. When clicking the view button, the browser opens the page with the correct url, but does not show any content, remains in that loading state for about 2 seconds and then performs the redirect. I tried canceling the loading process and viewing the page content via the inspector but the page is blank.
Update: I think, in the end, there was something wrong with my resources, too. I deleted the old resources of the subpages, recreated them, reassigned the templates and now even the view button seems to work. I guess, there was something corrupt along the way after all the changes of the settings.
Anyhow, thanks very much for your support, harry. Life saver award hereby officially handed over =)
Cheers.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.