Welcome to web 2.0 Blog

The Last news of the web Development from the world master's

10+ Mod_Rewrite Rules You Should Know

Posted by web2.0 Design resourse Friday, August 28, 2009 0 comments

Mod_rewrite is an Apache-based rewrite engine for dynamically rewriting URLs. It’s built into Apache servers natively, though not enabled by default.
It’s capable of functions beyond simple rewrites, though, some of which are included below.

Turn Mod_Rewrite On

Mod_rewrite is used through your .htaccess file. Place the following code at the beginning of your .htaccess file to turn mod_rewrite on:

RewriteEngine on
(Don’t forget that .htaccess commands are case-sensitive.) This code needs to be entered at the beginning of any .htaccess file using mod_rewrite.

The Basic Mod_Rewrite Layout

The basic format for a mod_rewrite command is:

RewriteRule Pattern Substitution [Flag(s)]

URLs are Always Relative

The URL you redirect to is always relative to the directory in which your .htaccess file is placed. So if it’s in the root directory, URLs are all in relation to the root directory; if it’s in a sudirectory, URLs are in relation to that particular subdirectory.
A Basic Redirect

If you just want to create a simple 301 redirect from one URL to another, then use the following code:

RewriteRule ^fileone.html$ filetwo.html

This is a very basic rule that means any requests for fileone.html will be sent to filetwo.html.

Require no “www”

This bit of code will make it so visitors to your site don’t need to type in the “www” bit of your website address.

RewriteCond %{HTTP_HOST} !^domain\.com$ [NC] 

RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]  

Block a Specific IP Address

If you want to block someone coming from a specific IP address from accessing your website, you can use the following code:

RewriteCond %{REMOTE_ADDR} ^(A\.B\.C\.D)$  

RewriteRule ^/* http://www.domain.com/sorry.html [L] 

Replace the A\.B\.C\.D with the IP address you want to block (don’t forget to leave the “\” before each dot, which escapes the character).

Design a 3D Box Icon in Photoshop

Posted by web2.0 Design resourse 2 comments

Design a 3D Box Icon in Photoshop 

Step 1: Create a new document

Start by creating a new document (Ctrl+N) 800×800 in dimension.

Step 2

Make a new layer(Ctrl+Shift+N).

Step 3

Make a selection using rectangle Marquee Tool(M) and Transform the selection as shown. Fill it with black.

Step 4

Change the color to grey (Right-click on the layer choose Blending options>Color overlay) and duplicate it. Move the duplicated layer as high as you want (this will determine box’s height). Make the duplicated layer black.

Step 5

Using Rectangle Marquee Tool (M), make a selection. Make a new layer, fill it with a gradient (Right-click on the layer Blending Options>Gradient overlay) Use a darker color on the lower part and a lighter color on the upper part. For my box, I used #f7bb01 for the upper part and #d3a305 for the lower part. Use shift to make the gradient go straight.

Step 6

We are going to fill the interior. Make a selection using Rectangular Tool (U). Make a new layer, fill it as shown. Make a layer for every side you fill.

Step 7

Make shadows for the sides (Use Burn Tool (O) with similar settings).

Step 8

Make shadows for the middle part of the interior. I suggest using a similar selection. Use Burn Tool (O) with similar settings.

Step 9

Make A selection similar to the one shown and fill it with the same colors you have used for the box. Make selections and add add a gradient with the same colors used for the box (dark one on the near part and ligther one for the far part) and add highlights for the center similar to the ones shown.

Step 10

Set your brush to a small size (3px for my size was perfect, 5px was a bit too big). Using Pen Tool, make a straight line on the corners, make a new layer for each line and make a stroke path (Pen Tool (P) — Right Click — Stroke Path — Set it on Brush and press Ok). Using Eraser bring the lines to the right tone. Do the same for the upper part of the box.

Step 11

Make a new selection and make a new layer. Using Gradient Tool (G) fill the selection with 2 tones of grey (darker for the close part and lighter for the far part). I used #dcdcdc as a light grey and #9b9b9b as the dark grey.

Step 12

Make a new layer and make a shadow using Pen Tool (P) by making a path that follows the form of the interior and using a size 3px (or bigger depending to your image size) stroke the path  as shown previously. Use for the color black and set the layer on overlay. Set the opacity as you want (I suggest 60-70%).

Step 13

Select the layer of the box  and make a selection for a small reflection and using Levels (L) lighten it a bit. Make a small selection as shown for a little shadow on the box and using Burn Tool (O) darken it as you want.

Step 14

Using Rectangle Tool (U) make a selection for the black line. Make a new layer UNDER the layer of the reflections and fill it with BLACK. Using Pen Tool (P) make a selection to see how will the rear line look. Make a selection and fill it with black where the yellow used to be. To add texture to the interior use Noise (Filter — Noise — Add Noise) on a black layer with the form of the interior (3rd picture). Set the noise on Soft Light blending mode and reduce the opacity of the layer.

Step 15

Make a selection for the papers. Make a selection similar to the one shown. Deselect from the selection the front of the box and fill the layer with white. To make the shadows use Pen Tool (P) with a feather similar to 1, 2px . Use Levels (L) to darken the paper accordingly.

Step 16

Duplicate the layer and fill the duplicated layer with a darker grey (I used #c4c4c4). Move the duplicated layer under the white paper. Using Free Transform (CTRL + T) rotate the paper. Make a selection and remove from the layer anything that is out of the box.

Step 17: Reflections&Shadow

Now comes the nice part. I explained how I added reflections and shadows. You can make them as you wish. To add texture to the front, use Noise (Filter>Noise>Add noise) as much as you want as shown previously.
Use Type Tool(T) to add a reffering text like .doc/.psd/.pdf etc. , it depends of what would you want to use this icon.

Final Result

Download the PSD


There are countless tutorials, articles, resources all about how to use Photoshop more efficiently, tips, tricks. Photo manipulation is one of the most interesting skills and most creative art dressed in future/present digital age in my opinion. On this list You’ll find showcased many artists from Worth1000 site – which is popular with its numerous contests and amazing photo manipulation works. Every pick has been carefully picked from the crowd – some of these works are really funny, some works look unbelievably real – but all of those works will inspire You a lot, I assure this!
If You still don’t know – everything is possible with Photoshop and here You can see, what can be done with Photoshop power in it’s best performance!

1.Eye Drop By catfish08


2. Gold-Shark By ozlemarc


3. Bunny Buddies By pixel8r


4. SkyDumbo By tombarreto


5. Gator Boot By Lanegi


6. Elephant Man By damonfreemanza


7. Medieval Kitty By NomeDaBoy


8. Tortosaurous By payallin


9. Chihuahua By Deschain420


10. The Iceberg Castle By bpkelsey


11. Dreamscape By funkwood


12. Winter By pepiqeq


13. Faerie adventure party By solipsism


14. Apple House Of The Mouse By Bebo21


15. Broccoli House By Tonebarge


16. Dolphin racing By willyr


17. Voices By echoburst


18. Fear By Dziedzic


19. Tears of Love By Slime


20. Swiiiiiiiiiimming By laavy86


21. Leggo My Nut By tcthompson


22. Fire roller By magnusx2


23. Milkrose By beanfarmer


24. Rose-Swan By castiza


25. Usain Bolt By despiris


26. Mrs Rowan-Atkinson By HogHeaven


27. Trick Shot By bpkelsey


29. Mona Disel By NinhaBR


30. OLD BBOY By artb13


31. Break-A-Hip Dance By DerekBurns

“Never too old to dance.”

32. Ostrich By Dappers

“Ostriches have been sticking their heads in the sand for ages. But now -after many experiments- scientists finally succeeded in creating an ostrich that dares to show its teeth!”

33. Cat Cocktail By Sassydeb

“There are no worms in Tequila in a world of cats…only goldfish.”

34. Hairy Wine & Bow By vanettenc

“A little white wine, a little red bow”

35. Tigegel By Tsirulnik


36. Pug Bug By BarMcGoohan

“Part spider, part pug, part mouse…all fun! It’s the pug bug.”

37. Speed Limit By Deplacent


38. Desert By robster

“For a little laugh on travelling through the desert…”

39. Palatable Cauliflower By Kwyjibo78


40. 0.25mm Gatling Pen By Scaramanga75


41. St0n3h3ng3 By beanfarmer


42. Family Picnic By Onepixel


43. Jacko-balloon By easterbeast


44. Grape O Lanterns By lucimine


45. Dragon Cloud By artb13


46. Happy New Year, Chuck! By JuniorWences


47. ApplePea By GeshaR


48. Waterfall By rasiresi


49. Tree of Death By catfish08

“A tree of death…I hope you can see it”

50. Spirit By biutifool


51. Baby Pear By FairMagda


52. Sushi Mermaid By Petrosini


53. Cheers! By misstrixie


54. Floating Fish By Alton


55. Scuba By Mandrak


56. Moto Splash By BonnySaintAndrew


57. Floating Forest By chris_


58. Tortoise Cake By JuniorWences


59. Safari run By Killington

“Get back here with my shorts!”

60. Camping By Onepixel


61. Smooth Landing By afeldman


62. Las Vegas By bosss1


63. Ladybird Computer Mouse By davidowens


64. Water Born By rasiresi


65. Moby dick By kpsunil7

Get inspired and if You think You are worthy – compete by Yourself on Worth1000!


free counters