RishiShreshtha

.htaccess

Apr 22nd, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.10 KB | None | 0 0
  1. RewriteEngine On
  2.  
  3. # use this base for lab
  4. # RewriteBase /goldoller.com/
  5.  
  6. # use this base for production
  7. RewriteBase /
  8.  
  9. RewriteCond %{HTTP_HOST} ^goldoller.com [NC]
  10. RewriteRule ^(.*)$ http://www.goldoller.com/$1 [R=301,NC]
  11.  
  12. RewriteRule ^portal$ portal/ [R]
  13. RewriteRule ^portal/$ portal/index.php [L,QSA]
  14.  
  15. RewriteRule ^blog/(.*)$ blog/$1 [L,QSA]
  16.  
  17. RewriteRule ^([^\/\.]+)$ $1/ [R]
  18.  
  19. # properties
  20. RewriteRule ^our-properties/details/([^\/\.]*)/$ p.php?l=our-properties&pl=$1 [L,QSA]
  21. RewriteRule ^our-properties/page/([^\/\.]*)/$ p.php?l=our-properties&page=$1 [L,QSA]
  22.  
  23. # search
  24. RewriteRule ^search/([^\/\.]*)/$ p.php?l=search&search-text=$1 [L,QSA]
  25.  
  26. # tertiary
  27. RewriteRule ^([^\/\.]*)/([^\/\.]*)/([^\/\.]*)/$ p.php?pp=$1&p=$2&l=$3 [L,QSA]
  28. RewriteRule ^([^\/\.]*)/([^\/\.]*)/([^\/\.]*)/\#([^\/\.]*)$ p.php?pp=$1&p=$2&l=$3\#$4 [L,QSA]
  29.  
  30. # secondary
  31. RewriteRule ^([^\/\.]*)/([^\/\.]*)/$ p.php?p=$1&l=$2 [L,QSA]
  32. RewriteRule ^([^\/\.]*)/([^\/\.]*)/\#([^\/\.]*)$ p.php?p=$1&l=$2\#$3 [L,QSA]
  33.  
  34. # primary
  35. RewriteRule ^([^\/\.]*)/$ p.php?l=$1 [L,QSA]
  36. RewriteRule ^([^\/\.]*)/\#([^\/\.]*)$ p.php?l=$1\#$2 [L,QSA]
Advertisement
Add Comment
Please, Sign In to add comment