nguonchhay
(Touch Nguonchhay)
September 13, 2016, 12:45pm
1
Hi everyone,
I host a Neos to shared hosting server and add .htaccess inside public_html to redirect to public_html/Web. I am not sure that cause a problem or not but the url contains index.php.
Could someone experience this problem and how to fix it?
As far as I understand it you have public_html specified as your root whereas it should be the Web folder.
That also makes your .htaccess that redirects stuff obsolete.
hd77
(Christian Schwahn)
September 13, 2016, 12:52pm
3
The vhost must point directly to the Web path. You have to configure the vhosts.
< VirtualHost *:80>
DocumentRoot "/var/www/html/YourProject/Web/"
SetEnv FLOW_CONTEXT Development
ServerName www.domain.com
< Directory /var/www/html/YourProject/Web/>
AllowOverride All
< /Directory>
< /VirtualHost>
nguonchhay
(Touch Nguonchhay)
September 13, 2016, 1:11pm
4
Hi Christian,
It is a shared hosting and the root path is public_html. Do you have other solution?
nguonchhay
(Touch Nguonchhay)
September 13, 2016, 1:13pm
5
Hi David,
It is a shared hosting and the default root is public_html. Do you have any suggestion?
bwaidelich
(Bastian Waidelich)
September 13, 2016, 1:14pm
6
Make sure that
SetEnv FLOW_REWRITEURLS 1
is set. If you’re not allowed to set env variables via .htaccess, you might have to add it to the index.php
until https://github.com/neos/flow-development-collection/pull/56 is merged
nguonchhay
(Touch Nguonchhay)
September 13, 2016, 1:21pm
7
Hi Bastian,
SetEnv FLOW_REWRITEURLS 1
was already set.
bwaidelich
(Bastian Waidelich)
September 13, 2016, 1:22pm
8
But was it accepted?
You can check via
Bootstrap::getEnvironmentConfigurationSetting('FLOW_REWRITEURLS')
nguonchhay
(Touch Nguonchhay)
September 13, 2016, 2:10pm
9
Hi Bastian,
How to run your comment script? Do you any suggestion to fix my problem?
Thanks.
bwaidelich
(Bastian Waidelich)
September 13, 2016, 2:42pm
10
You mean how to debug that value?
the hardcore way is to add
\TYPO3\Flow\var_dump(Bootstrap::getEnvironmentConfigurationSetting('FLOW_REWRITEURLS'));exit;
anywhere to your code to see whether it is actually set. If not, you can set it via
setenv()
benjamink
(Benjamin Klix)
August 31, 2017, 9:18am
11
Do you have the rights to add files/folders above the public_html folder? Maybe you can simply use public_html instead of Web und place the other files one level up.