Jiná verze PHP pro subdoménu

Vyřešeno711 zhlédnutíDomény
0

Zdravím,

chtěla jsem si vytvořit testovací stránky pro projekt. Aktuální projekt nemůže běžet na vyšší verzi PHP než 5.6, ale pro nový redakční systém potřebuji minimálně verzi 7.0.8. Na stránkách wedosu jsem se v jedné otázce dozvěděla, že lze přepsat za tímto účelem htaccess soubor:

RewriteEngine On

RewriteRule ^(.*).php$ http://test.example.eu/$1.php73 [R=301,L]

To však vyústilo v ERR_TOO_MANY_REDIRECTS. Po úpravě na

RewriteRule ^(.*).php$ $1.php73 [L]

jsem tento problém nejspíš vyřešila, adresa se automaticky přepíše na test.example.eu/index.php73. Místo toho dostávám jinou chybu

Internal server error – 500

Marně procházím různá fóra a hledám chybu. Celý htaccess soubor:

<IfModule mod_rewrite.c>

<IfModule mod_negotiation.c>
#Options -MultiViews
</IfModule>

RewriteEngine On
RewriteRule ^(.*).php$ $1.php73 [L]

##
## You may need to uncomment the following line for some hosting environments,
## if you have installed to a subdirectory, enter the name here also.
##

RewriteBase /

##
## Uncomment following lines to force HTTPS.
##
# RewriteCond %{HTTPS} off
# RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R=301]

##
## White listed folders
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} !/.well-known/*
RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/.*
RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
RewriteRule !^index.php /index.php [L,NC]

##
## Black listed folders
##
RewriteRule ^bootstrap/.* /index.php [L,NC]
RewriteRule ^config/.* /index.php [L,NC]
RewriteRule ^vendor/.* /index.php [L,NC]
RewriteRule ^storage/cms/.* /index.php [L,NC]
RewriteRule ^storage/logs/.* /index.php [L,NC]
RewriteRule ^storage/framework/.* /index.php [L,NC]
RewriteRule ^storage/temp/protected/.* /index.php [L,NC]
RewriteRule ^storage/app/uploads/protected/.* /index.php [L,NC]

##
## Block all PHP files, except index
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule !^index.php /index.php [L,NC]

##
## Standard routes
##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /index.php [L]

</IfModule>

Při instalaci redakčního systému (October CMS) jsem install.php spouštěla ve verzi 7.3, instalace proběhla v pořádku, přístup na stránky jsem měla.

Role: Zákazník
Otázka je uzamčena pro nové odpovědi.
RM130195 Vybral nejlepší odpověď 2. 9. 2020
0
49.27K Odpověď od WEDOS Internet, a.s. 0 Comments

Dobrý den,

aby bylo možné soubory spouštět s jinou verzí PHP, tak bude nutné je mít takto pojmenované i na FTP, tedy např. index.php73, což u CMS nejspíše nepůjde nastavit.

Jediným dalším řešením je pak založit pro subdoménu vlastní webhosting – tedy webhosting pro doménu třetího řádu.

Role: Podpora
RM130195 Vybral nejlepší odpověď 2. 9. 2020