Advertisement
Guest User

dynamic redirection

a guest
Jul 21st, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. RewriteEngine on
  2. RewriteBase /
  3. RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+/city/(chennai|pune|mumbai)/search/search_display_event_type/Meetings[\s/?] [NC]
  4. RewriteRule ^ %1/%2 [L,R=302]
  5.  
  6. RewriteCond %{HTTP_HOST} !^www\.
  7. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  8.  
  9. # Prevent CI index.php
  10.  
  11. RewriteCond %{REQUEST_FILENAME} !-f
  12.  
  13. RewriteCond %{REQUEST_FILENAME} !-d
  14.  
  15. RewriteRule .* index.php/$0 [PT,L]
  16.  
  17. # Prevent user access to the CI system folder.
  18.  
  19. RewriteCond %{REQUEST_URI} ^system.*
  20.  
  21. RewriteRule ^(.*)$ /index.php?/$1 [L]
  22.  
  23. # Prevent user access to the CI application folder
  24.  
  25. RewriteCond %{REQUEST_URI} ^application.*
  26.  
  27. RewriteRule ^(.*)$ /index.php?/$1 [L]
  28.  
  29. # This allows you to redirect
  30.  
  31. Redirect 301 /city/Pune http://www.domain.org/pune
  32. Redirect 301 /city/pune http://www.domain.org/pune
  33. Redirect 301 /Pune http://www.domain.org/pune
  34.  
  35. redirect /city/Mumbai http://www.domain.org/mumbai
  36. redirect /city/mumbai http://www.domain.org/mumbai
  37. redirect /Mumbai http://www.domain.org/mumbai
  38.  
  39. redirect /city/Bangalore http://www.domain.org/bangalore
  40. redirect /city/bangalore http://www.domain.org/bangalore
  41. redirect /Bangalore http://www.domain.org/bangalore
  42.  
  43. redirect /city/Hyderabad http://www.domain.org/hyderabad
  44. redirect /city/hyderabad http://www.domain.org/hyderabad
  45. redirect /Hyderabad http://www.domain.org/hyderabad
  46.  
  47.  
  48. redirect /city/Goa http://www.domain.org/goa
  49. redirect /city/goa http://www.domain.org/goa
  50. redirect /Goa http://www.domain.org/goa
  51.  
  52.  
  53. redirect /city/Delhi http://www.domain.org/delhi
  54. redirect /city/delhi http://www.domain.org/delhi
  55. redirect /Delhi http://www.domain.org/delhi
  56.  
  57.  
  58. redirect /city/Chennai http://www.domain.org/chennai
  59. redirect /city/chennai http://www.domain.org/chennai
  60. redirect /Chennai http://www.domain.org/chennai
  61.  
  62.  
  63. redirect /city/Kolkata http://www.domain.org/kolkata
  64. redirect /city/kolkata http://www.domain.org/kolkata
  65. redirect /Kolkata http://www.domain.org/kolkata
  66.  
  67.  
  68. Header set X-Robots-Tag "noindex, nofollow"
  69. Options -Indexes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement