GravityFX
-
Posts
20 -
Joined
-
Last visited
Never
Posts posted by GravityFX
-
-
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.
-
Can some one write simple links anonymizer, that hides sites/users referal and redirects to the site without any timeouts. Kind of like http://anonym.to/?http://google.com but without any timeouts, maybe only 1sec. if required. Thank you.
-
It would be nice if you had, LightTPD Web Server topic just like you have for Apache. Also, PHP-Fusion CMS topic which is underrated, its amazing fast cms. Way faster then Drupal or Joomla. Thank you.
-
The http://gravityfx.org/blog/index.php Works, but when I use http://gravityfx.org/blog/ It gives me error 500.
-
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!
-
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
-
Yes, I do! I get this error:
Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500
-
Hello, I've installed "XAMPP" http://www.apachefriends.org/en/xampp.html
I am trying to create short url based on my old file:
This code works just fine on my internet site:
RewriteEngine on RewriteRule ^([^\.]+)$ index.php?p=$1 [L]
I am using http://localhost/index.php?p=news right now, how can I mod_rewrite on my local server, so it will work right, http://localhost/news
-
No, that not the problem, but thanks for pointing that out =D I fixed the problem thanks to:
http://www.phpfreaks.com/forums/index.php/topic,146460.0.html
-
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
-
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 !
-
It works, but its shows my error by default now, instead of news.php =D What is wrong ?
-
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 =)
-
Yeah, but the problem is that I need default to include my news.php at startup...
-
Ok, One more question =D
How can I add error handler, like in my old code ?
-
Hahaha you right ;-) my bad. I should of thought about that! Thanks teng84.
-
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 ;-)
-
OK, But can you show me full example? I am kind of new to php...
-
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...
Anonymize all links?
in PHP Coding Help
Posted
I was looking for something like this too ;-) Thank you, Goldeneye