PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 
Site Navigation

Home:

 
Donate o Meter
Help Keep Our Servers Online AND Our Services Free!
Make donations with PayPal!
Donations
 
Please Link To Me!
 
Quality Web Hosting For All PHP Applications
Quality PHP Web Host!

Great Reviews!
Need help setting up your website, installing Apache, PHP, MySQL, or RavenNuke(tm)?
Need help customizing or designing scripts?
Please contact us via the Contact Us option for further details and pricing.

Link to Me

RavenPHPScripts

RavenPHPScripts

There are more Link To Me icons here.
 
Site Info v2.2.2 ©
Your IP: 38.107.191.95

 Welcome, Anonymous
Nickname
Password
Security Code:
Security Code
Type Security Code:

· Register
· Lost Password
Server Date/Time
2 September 2010 12:58:46 EDT (GMT -4)
 
URL's that end with trailing slash, like index.php/ wreck havoc in PHP Nuke 
Bugs - Fixed

I got an email today asking me if there was a bug on my site. The person mistyped the url as http://www.nukescripts.net/index.php/ and it caused an interesting effect. The index page loaded but would not load any of the style of graphics it should have. I then tested that with /admin.php/ and it caused the same effect. While this is not an exploit it is very upsetting that it happens at all so here is the cure: Open your mainfile.php and put:

if($_SERVER['REQUEST_URI'] != "/" AND substr($_SERVER['REQUEST_URI'], -1) == "/") { header("Location: http://".$_SERVER['HTTP_HOST'].rtrim($_SERVER['REQUEST_URI'],'/')); } right after the opening < ?php. If your running NukeSentinel(tm) place it above the NukeSentinel(tm) inclusion and after the < ?php .

If you use Apache and have access to either the httpd.conf file or the .htaccess file, you can use the following code at the server level:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*) $1

This fix brought to you by NukeScripts and Raven PHPScripts.






Posted on Wednesday, December 15, 2004 @ 19:42:10 EST by BobMarion
 
Related Links
· More about Bugs - Fixed
· News by BobMarion


Most read story about Bugs - Fixed:
Warning: get_lang ... failed to open stream: Error

 
Article Rating
Average Score: 0
Votes: 0

Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


 
Options

 Printer Friendly Page  Printer Friendly Page

 Send to a Friend  Send to a Friend

 

Re: URL's that end with trailing slash, like index.php/ wreck havoc in PHP Nuke (Score: 1)
by money on Wednesday, December 15, 2004 @ 21:37:04 EST
Not registered user
This problem can be fixed by simply adding a base tag between the [head][/head] tags in the page's header.

Example:
[base href="http://www.yourdomainname.tld/" /]

The href can be adjusted if the script is installed on a subdomain or subdirectory.

** Note: change square brackets shown above to angled ones.



404s over here (Score: 1)
by oprime2001 on Wednesday, December 15, 2004 @ 22:01:06 EST
Not registered user
I got 404s when I tried the trailing slash on index.php and admin.php on my sites.


 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2010 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum