Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shows a 404 page on the base link due to url duplication (using .htaccess file only) #23

Closed
poVoq opened this issue Sep 28, 2017 · 13 comments

Comments

@poVoq
Copy link

poVoq commented Sep 28, 2017

Just updated to version 0.95 and now there is an issue with the redirection. I am using the mod rewrite.

When I go to
https://myurl.com/sites/newsite/
it gives me the pico cms 404 page because it redirects to:
...index.php/apps/cms_pico/pico/newsite/newsite

Probably the same cause as this:
#22

@ArtificialOwl
Copy link
Member

I cannot reproduce the bug, can you provide more details about the lines you added to the Apache configuration

@poVoq
Copy link
Author

poVoq commented Sep 28, 2017

As by the instructions:
RewriteRule /sites/(.*) https://mysite.com/nextcloud/index.php/apps/cms_pico/pico/$1 [QSA,L]
it was working fine in version 0.94.

@ArtificialOwl
Copy link
Member

I made some test with a webroot like your configuration 'mysite.com/nextcloud/index.php' and fixed some bugs from the list of the website in the personal settings.

But I still were not able to reproduce this bug. Could you check again the configuration of your apache from the begining ?

@poVoq
Copy link
Author

poVoq commented Sep 29, 2017

I have honestly no idea what else to change and it runs on a shared host.
You can have a look at the webconsole output on this live page that runs version 0.95:
Edit: Link no longer working

@ArtificialOwl
Copy link
Member

does it means that you don't have full control over apache configuration ?

@poVoq
Copy link
Author

poVoq commented Sep 29, 2017

Yes only .htaccess editing. But as I said, this problem did not occur with version 0.94 and I did not change the .htaccess file meanwhile.

@scar86
Copy link

scar86 commented Oct 5, 2017

Hello
I may have a similar issue but with 0.9.6, it is the first time I install the app on my site
My site is not on the root directory of apache, it is instead on /nextcloud like https://mysite.com/nextcloud
If I create a new site using cms_pico it tell me that my address should be https://mysite.com/sites/my_site that is wrong since it is missing the /nextcloud part on the address, I also tried to access it like https://mysite.com/nextcloud/sites/my_site with no luck, both links only trough the 404 not fund apache site

I have fully control on the apache server in case something is required to debug the problem

Thanks !

@poVoq
Copy link
Author

poVoq commented Oct 5, 2017

No this is unrelated. You just need to setup the .htaccess file accordingly.

@ArtificialOwl
Copy link
Member

@poVoq : the strange thing is that it looks like an issue with the rewrite from your apache configuration, and not an issue with the app itself.

@scar86 : @poVoq is right, it seems that you haven't configured your Apache

@scar86
Copy link

scar86 commented Oct 11, 2017

Thanks a lot guys !, I didn't even know that I need to configure Apache, it is working now

@poVoq
Copy link
Author

poVoq commented Dec 21, 2017

With 0.97 this still happens.

Somehow the "my_site" appendix is added again as a parameter or so.

So if I go to https://mydomain/sites/my_site
I end up at https://mydomain/nextcloud/index.php/apps/cms_pico/pico/my_site/my_site
Which is of course a 404.

But for example if I go to:
https://mydomain/sites/my_site/
I end up at https://mydomain/nextcloud/index.php/apps/cms_pico/pico/my_site//my_site

And if I try to go to:
https://mydomain/sites/my_site/index
I end up at https://mydomain/nextcloud/index.php/apps/cms_pico/pico/my_site/index/my_site/index

I really can't see where my .htaccess file might be causing this, so I am really at a loss.

@poVoq poVoq changed the title With 0.95 it shows a 404 page on the base link. Shows a 404 page on the base link due to url duplication (using .htaccess file only) Dec 21, 2017
@poVoq
Copy link
Author

poVoq commented Dec 21, 2017

Ok, what seems to have fixed it was to create a dummy directory called "sites" in my web-root.
So I guess it was a very strange interference in the .htaccess rules for redirecting to virtual pages of my normal CMS that by having the "RewriteCond %{REQUEST_FILENAME} !-d" condition in there I was able to trick.

@PhrozenByte
Copy link
Collaborator

Pico CMS for Nextcloud v1.0.0 is arriving and I'm currently working through some old issues that can be resolved before releasing the app's first stable release. See help.nextcloud.com for more info.

Can you please check whether your issue persists with Pico CMS for Nextcloud v1.0.0? I couldn't reproduce it. If your issue persists, please open a new Issue here on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants