Post: [TUTORIAL] How to get rid of ?i= or ?img= in your ScreenSnapr Template
07-16-2011, 06:51 AM #1
Cain
Tutorial Team Like A Boss
(adsbygoogle = window.adsbygoogle || []).push({}); By request alot of people have been asking me how to do this.
You first need to check if your host has a .htaccess file and uses mod_rewrite.

To check this, create a new page called check.php and put inside it <?php phpinfo(); ?>
Then visit it and hope that mod_rewrite is enabled.

Now .htaccess is a hidden file so if you use cPanel 11 check "Show hidden files" when you enter the File Manager.

Edit the .htaccess file and add the following
    RewriteEngine on
RewriteRule ^[B]i[/B]/([^/\.]+).png?$ [B]/i/index.php?i=[/B]$1 [L]


You will need to modify that code, where ^i/ is, place where you would go normally, eg.
You must login or register to view this content.i/

Then in /i/index.php?i= it's kinda obvious how to do that.
Now you will need to modify your page settings a little.

Because of this rewrite engine, there will be errors if you try and visit a image if you go into the /i/ directory, so what you want to do is create a new directory inside /i/ called "imgs" and modify where your images upload in your screensnapr like so

Directory: public_html/i/imgs/
URL: You must login or register to view this content.

Then in your index.php, you will need to modify where your images are, eg.
<?php if($i=="") { echo ""; } elseif(file_exists($i)) { echo "<img src='" . $i . "' />"; } ?>
to
<?php if($i=="") { echo ""; } else { echo "<img src='imgs/" . $i . ".png' />"; } ?>

I had a bit of trouble getting file_exists working with the new script but i'll get it sorted eventually.

Anyway your screensnapr should now work.
If it doesn't feel free to say so and I will help you out.
(adsbygoogle = window.adsbygoogle || []).push({});
07-16-2011, 01:21 PM #2
MarcJ
NGU Radio Owner Smile
Simple stuff, but good for people who have no clue. Nice release.
07-19-2011, 04:19 AM #3
Originally posted by CainErased View Post
By request alot of people have been asking me how to do this.
You first need to check if your host has a .htaccess file and uses mod_rewrite.

To check this, create a new page called check.php and put inside it <?php phpinfo(); ?>
Then visit it and hope that mod_rewrite is enabled.

Now .htaccess is a hidden file so if you use cPanel 11 check "Show hidden files" when you enter the File Manager.

Edit the .htaccess file and add the following
    RewriteEngine on
RewriteRule ^[B]i[/B]/([^/\.]+).png?$ [B]/i/index.php?i=[/B]$1 [L]


You will need to modify that code, where ^i/ is, place where you would go normally, eg.
You must login or register to view this content.i/

Then in /i/index.php?i= it's kinda obvious how to do that.
Now you will need to modify your page settings a little.

Because of this rewrite engine, there will be errors if you try and visit a image if you go into the /i/ directory, so what you want to do is create a new directory inside /i/ called "imgs" and modify where your images upload in your screensnapr like so

Directory: public_html/i/imgs/
URL: You must login or register to view this content.

Then in your index.php, you will need to modify where your images are, eg.
<?php if($i=="") { echo ""; } elseif(file_exists($i)) { echo "<img src='" . $i . "' />"; } ?>
to
<?php if($i=="") { echo ""; } else { echo "<img src='imgs/" . $i . ".png' />"; } ?>

I had a bit of trouble getting file_exists working with the new script but i'll get it sorted eventually.

Anyway your screensnapr should now work.
If it doesn't feel free to say so and I will help you out.


Can you teamview me? I don't understand what I should do.

EDIT:
Cain fixed it for me Cool Man (aka Tustin)

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo