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

beautiful-eye-photomanipulation

2. Gold-Shark By ozlemarc

gold-shark-photomanipulation

3. Bunny Buddies By pixel8r

bunny-buddies-photomanipulation

4. SkyDumbo By tombarreto

skydumbo-photomanipulation

5. Gator Boot By Lanegi

gator-boot-photomanipulation

6. Elephant Man By damonfreemanza

elephant-man-photomanipulation

7. Medieval Kitty By NomeDaBoy

medieval-kitty-photomanipulation

8. Tortosaurous By payallin

tortosaurus-photomanipulation

9. Chihuahua By Deschain420

chihuahua-photomanipulation

10. The Iceberg Castle By bpkelsey

the-iceberg-castle-photomanipulation

11. Dreamscape By funkwood

dreamscape-photomanipulation

12. Winter By pepiqeq

winter-photomanipulation

13. Faerie adventure party By solipsism

faerie-adventure-party-photomanipulation

14. Apple House Of The Mouse By Bebo21

applehouse-of-mouse-photomanipulation

15. Broccoli House By Tonebarge

brocolli-house-photomanipulation

16. Dolphin racing By willyr

dolphin-racing-photomanipulation

17. Voices By echoburst

voices-photomanipulation

18. Fear By Dziedzic

fear-photomanipulation

19. Tears of Love By Slime

tears-of-love-photomanipulation

20. Swiiiiiiiiiimming By laavy86

swimming-photomanipulation

21. Leggo My Nut By tcthompson

leggo-my-nut-photomanipulation

22. Fire roller By magnusx2

fire-roller-photomanipulation

23. Milkrose By beanfarmer

milkrose-photomanipulation

24. Rose-Swan By castiza

rose-swan-photomanipulation

25. Usain Bolt By despiris

usain-bolt-photmanipulation

26. Mrs Rowan-Atkinson By HogHeaven

mrs-rowan-atkinson-photomanipulation

27. Trick Shot By bpkelsey

trick-shot-photomanipulation

29. Mona Disel By NinhaBR

mona-diesel-photomanipulation

30. OLD BBOY By artb13

old-bboy-photomanipulation

31. Break-A-Hip Dance By DerekBurns

“Never too old to dance.”
break-a-hip-dance-photomanipulation

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!”
ostrich-photomanipulation

33. Cat Cocktail By Sassydeb

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

34. Hairy Wine & Bow By vanettenc

“A little white wine, a little red bow”
hairy-wine-bow-photomanipulation

35. Tigegel By Tsirulnik

tigegel-photomanipulation

36. Pug Bug By BarMcGoohan

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

37. Speed Limit By Deplacent

speed-limit

38. Desert By robster

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

39. Palatable Cauliflower By Kwyjibo78

palatable-cauliflower-photomanipulation

40. 0.25mm Gatling Pen By Scaramanga75

gatling-pen-photomanipulation

41. St0n3h3ng3 By beanfarmer

teh-roxor

42. Family Picnic By Onepixel

family-picnic-photomanipulation

43. Jacko-balloon By easterbeast

jacko-baloon-photomanipulation

44. Grape O Lanterns By lucimine

grape-o-lanterns

45. Dragon Cloud By artb13

dragon-cloud-photomanipulation

46. Happy New Year, Chuck! By JuniorWences

happy-new-year-chuck

47. ApplePea By GeshaR

apple-pea-photomanipulation

48. Waterfall By rasiresi

waterfall-photomanipulation

49. Tree of Death By catfish08

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

50. Spirit By biutifool

spirit-horse-photomanipulation

51. Baby Pear By FairMagda

baby-pear-photomanipulation

52. Sushi Mermaid By Petrosini

sushi-mermaid-photomanipulation

53. Cheers! By misstrixie

cheers-strawberry-photomanipulation

54. Floating Fish By Alton

floating-fish-photomanipulation

55. Scuba By Mandrak

scuba-water-world-photomanipulation

56. Moto Splash By BonnySaintAndrew

moto-splash-photomanipulation

57. Floating Forest By chris_

floating-forest-photomanipulation

58. Tortoise Cake By JuniorWences

tortoise-cake-photomanipulation

59. Safari run By Killington

“Get back here with my shorts!”
safari-run-photomanipulation

60. Camping By Onepixel

camping-photomanipulation

61. Smooth Landing By afeldman

smooth-landing-photomanipulation

62. Las Vegas By bosss1

las-vegas-photomanipulation

63. Ladybird Computer Mouse By davidowens

ladybird-computer-mouse

64. Water Born By rasiresi

water-born-photomanipulation

65. Moby dick By kpsunil7

moby-dick-photomanipulation
Get inspired and if You think You are worthy – compete by Yourself on Worth1000!

counter

free counters