PHP Magic Book – Free PHP Scripts, Tutorials and Downloads, PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips

Htaccess Mod Rewrite Practical Essential Important Solutions – Update

I have been experimenting with .htaccess a lot regarding with mod rewriting and URL rewriting and had a lot of difficulty finding the solutions regarding to exact problem I faced. This stuff is such a headache. I am feeling headache right now as I am typing after messing with a lot of .htaccess codes. Here is an update regarding essential stuff which you will find useful if you are trying to change your URLS from index.php to index.html or index.php to index and if after putting RewriteEngine on images are not showing up at pages. Following exercises will answer these tasks in htacces mod rewrite:

1- How to enable RewriteEngine for htaccess and localhost
2- Images are not showing after RewriteEngine on
3- Images in second level directory are not showing after RewriteEngine on
e.g. images/1.jpg is showing but images/icons/2.jpg is not showing up
4- Want to change index.php into index or about.php into about
5- Want to change all pages.php to pages.html for site using htaccess
6- Want to Rewrite yoursite.com/user.php?username=xyz to yoursite.com/xyz
7- Want to Rewriting product.php?id=12 to product/ipod-nano/12.html
8- Want to change product.php?id=5 to porduct-5.html

Read the rest of this entry »

Posted in: Mod Rewrite, htaccess
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Protect Hotlink the Right Way Using htaccess

Protect hotlinking the right way. There are content stealers out there who will copy your links and images and display them at their websites in result of which you pay more for bandwidth. If you do not do it the right way, you can block google and feedburner also. Here is a code to do it the right way. Any incoming direct request for your image file, zip file or rar will will display your specified image instead of that.

Read the rest of this entry »

Tags: , ,
Posted in: htaccess
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Hide Ads from Admin at Blog

You can trace which user is logged in. Users at WordPress have levels for access. Admin access level is 10. You can simply trace if the admin is logged in and hide ads from your blog so that admin may not see ads. If you are admin of a blog and post a lot then its a chance that you submit impressions for ads by yourself while checking your posts after publishing. More impressions but less click = less earnings. Hide your ads from you. You definitely don’t want to click your own ads, for sure. That’s why it is useful to hide your own ads from you to reduce load time + avoid impressions you do not want + more earnings.

Read the rest of this entry »

Posted in: General
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Change Default WordPress Gravatar in Comments

If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars.

< ?php echo get_avatar( $comment, 32 ); ?>

You can easily modify this code to show a default customized gravatar to appear if the comment author has no gravater to show.

Read the rest of this entry »

Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Only Allow Your IP to Access Website or Blog Admin

If you are the only owner of any website or blog and want to protect your admin directory then you can allow that admin directory for just your IP and deny from all others. Here it is how.

Read the rest of this entry »

Posted in: Security
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment


Related Posts




  Subscribe Via RSS
  Subscribe Via Email