vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Setting up WOL for custom script (https://vborg.vbsupport.ru/showthread.php?t=290257)

WorldCraft 11-07-2012 12:26 AM

Setting up WOL for custom script
 
I'm trying to set up a WOL entry for a custom script. However the script is named index.php and in a directory above my forum root.

If I use:
PHP Code:

switch ($filename)
{
    case 
'index.php':
        
$userinfo['activity'] = 'mypage';
        break;


Won't this apply the WOL for ALL scripts titled index.php??? It's the only method I know how to add a WOL entry. Is there another way?

Lynne 11-07-2012 12:38 AM

That is going to be difficult to do. I think I saw a post that includes instructions on how to do it in the article about creating plugins for the WOL page, so go read through that.

WorldCraft 11-07-2012 12:43 AM

Alright, well I suppose a better question would be, is there a way to set a script that isn't named index.php as default for a directory? Then I can ignore this WOL issue altogether. I just need it to be the default script.

snakes1100 11-07-2012 01:03 AM

If its apache: DirectoryIndex (Which you can modify in httpd.conf, simply add the file name, HUP apache.

You can do the same for Nginx as well.
index index.html index.php /index.php;

WorldCraft 11-07-2012 01:22 AM

Quote:

Originally Posted by snakes1100 (Post 2379010)
If its apache: DirectoryIndex (Which you can modify in httpd.conf, simply add the file name, HUP apache.

You can do the same for Nginx as well.
index index.html index.php /index.php;

Thanks. When entering http://www.mysite.com/radio/ it does load the correct script. However, since there is no file at the end of the URL, the WOL plugin does not execute.

I put "DirectoryIndex radio.php" in .htaccess for that directory. Is there something I can specify so that it will make the url appear as http://www.mysite.com/radio/radio.php ?

snakes1100 11-07-2012 03:43 PM

Try This:
RewriteCond %{HTTP_HOST} ^example.com/radio/$
RewriteRule ^$ http://example.com/radio/radio.php [L,R=301]

WorldCraft 11-07-2012 07:13 PM

Thanks for the help, it is working now. :)

snakes1100 11-07-2012 07:48 PM

welcome


All times are GMT. The time now is 11:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01027 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete