php - Execute an adittional script before access a location in apache -


i want run script before locations specified in <location> ca accessed :

<location "/add-content">  # run /var/www/abc/custom-script.php first  # continue load actual page </location> 

i have many websites having url in server, can't done in application level.

can in apache?

you'll want set handler:

<location "/add-content">     # run /var/www/abc/custom-script.php first     # continue load actual page     action pre-script /var/www/abc/custom-script.php     sethandler pre-script </location> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -