Jump to content

GravityFX

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Posts posted by GravityFX

  1. Is it possible to rewrite this bellow rule for LightTPD config file.

     

    if(!stristr($_SERVER['HTTP_REFERER'], "website.com/infusions/wrapper/wrapper.php?wrapper_id=1")) { die("Access Denied"); }

     

    What I need is be able to connect to site_1 with website.com/infusions/wrapper/wrapper.php?wrapper_id=1 other direct connections to the index listing block.

     

    Thank you.

  2. Hello, I am having trouble using my sub-domains of directories. Is there a way to ignore specific sub-domains or directories ? This is my .htaccess file:

     

    IndexIgnore *
    
    RewriteEngine on
    
    # Prevent viewing of .htaccess file
    <Files .htaccess>
      order allow,deny
      deny from all
    </Files>
    
    # Short URLs   
      RewriteRule ^([^\.]+)$ index.php?p=$1 [L]

     

    I need to fix "Short URLs" part ;-) I've created sub-domain http://blog.gravityfx.org/ but when I logging to my blog I get to http://blog.gravityfx.org/wp-admin/ instead of http://blog.gravityfx.org/wp-admin/index.php Also when I use sub-domain like so: http://gravityfx.org/blog/ it does not work, it says error 404 - not found. Now I've created sub-domain > http://wiki.gravityfx.org/ and it says Not Found. Please help. Thanks!

  3. ok thanks ;-) Solved the problem!

     

    If you are using XAMPP too, you can follow this steps:

     

    1st. I've edited file "httpd.conf" in "xampp\apache\conf" directory.

     

    All you due is un-comment line #118

     

    From:

    #LoadModule rewrite_module modules/mod_rewrite.so

     

    To:

    LoadModule rewrite_module modules/mod_rewrite.so

     

    Then restart your XAMPP apache server.

     

     

    2nd. Write .htaccess file:

     

    # short urls
    RewriteEngine on   
    RewriteRule ^([^\.]+)$ index.php?p=$1 [L]

     

    This will make my urls short.

     

    Long url: http://localhost/index.php?p=news

     

    Short url: http://localhost/news

     

  4. Hello, I have a small problem with my css file, here: http://gravityfx.org/dev/style.css

     

    The main page on the http://gravityfx.org/dev/ works fine for menu buttons on the left. But when I am trying to create a link withing the page and the table/cell, like here: http://gravityfx.org/dev/friends  when you click on the link "Michael" it wont even go to the page, just jumps. Compare to http://gravityfx.org/dev/software  when link created without table/cell it works fine. I am thinking its something wrong with my css rollover effect that I am using, cuz when I commented "rollover" effect out, it worked fine. How can I fix this problem. Thanks =D

  5. OK, I figured this out ;-) Thanks. Here is a perfectly working switch code with error handler:

     

    <?php 
    if (isset($_GET['p'])){
    switch($_GET['p']){
    case 'test1':
    	include 'test1.php';
    	break;
    case 'test2':
    	include 'test2.php';
    	break;
    case 'test':
                    echo '<font face=Courier New size=2><pre>';
    	include 'pages/test.php';
                    echo '</pre></font>';
    	break;
    default: 
    	echo 'Error 404 - File Not Found!';
    	break; 
    }
    } else {
        include 'news.php';
    }
    ?>

     

    I've added error hander to default switch and my default page to else =D Thanks, teng84 You've bing a big help !

  6. Show it to me with this above code:

    <?php switch($_GET['p']){
    case 'test1':
    	include 'test1.php';
    	break;
    case 'test2':
    	include 'test2.php';
    	break;
    case 'test':
                    echo '<font face=Courier New size=2><pre>';
    	include 'pages/test.php';
                    echo '</pre></font>';
    	break;
    default: 
    	include 'main.php';
    	break; 
    } ?>

     

    Sorry, I don't get it =)

  7. Thank You, teng84 That was exactly what I was looking for ;-) works like a charm. Here is modified code:

     

    <?php switch($_GET['p']){
    case 'test1':
    	include 'test1.php';
    	break;
    case 'test2':
    	include 'test2.php';
    	break;
    case 'test':
                    echo '<font face=Courier New size=2><pre>';
    	include 'pages/test.php';
                    echo '</pre></font>';
    	break;
    default: 
    	include 'main.php';
    	break; 
    } ?>

     

    Now code works like I wan't, and I don't have that vulnerability any more =D

     

    But I have another small problem =D I am using this code as include in html, and I can't seem to have "Courier New" font work right... Any ideas why? I need to show my txt files as different font then php files =D Also is there a dynamic way to add like for example:

     

    php = tahoma font

    txt = courier new font

    html = ariel font

     

    Thanks ;-)

  8. Hello, I've bing using my php dynamic include code on my site. But I think its not safe, how can write safer and better code to replace this one:

     

    <?php
       if(isset($_GET['p'])) {
           $file = $_GET['p'].".php";
       } elseif (isset($_GET['t'])) {
           $filename = $_GET['t'].".txt";
       } else {
           include_once("news.php");
       }
    
       if (file_exists($file)) {
           include_once($file);
       } elseif (file_exists($filename)) {
           echo '<font size=2><pre>';
           include_once($filename);
           echo '</pre></font>';
       } else {
           include_once("error.php");
       }
    ?>

     

    Then all I due is <a href="?p=pagefile"> or text ;-) I hope someone can help me out. This is really important for me...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.