0
Hello,
I have a problem, I need you to access any file .php
, he directs to autostart.php?url=*.php
Explanation:
In the autostart.php
it da include in a file and after it gives include in the page that is on GET
.
I did it with HTACCESS, but I couldn’t make it work as I wanted.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .*\.(php)$ autostart.php?url=$1 [R,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
</IfModule>
It doesn’t pay to use "autoinclude" from PHP itself then? If you have access to this setting, you can use auto_prepend_file e auto_append_file.
– Bacco
More like, I would have to edit php.ini, I need a solution in the source code itself, since I need to use several times.
– Rafael Dantas
Actually, it wouldn’t be
^(*.)\.php)$ autostart.php?url=$1
? Because $1 would take the regex group returned in the first expression (and in your case this group would always be "php"). I hope I didn’t bullshit you, rsrsrsrs– Wallace Maxters