Welcome Guest, Not a member yet? Register   Sign In
The best way to re-route old urls
#5

[eluser]michalsn[/eluser]
@dobbler you're right - this should work ok:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|eventsi\.asp|resources|images|css|temp|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
RewriteCond %{QUERY_STRING} ^frob=(.*)&extra;=(.*)$ [NC]
RewriteRule ^.*$ /gallery/callback/%1/? [R=301,L]
RewriteCond %{QUERY_STRING} ^e=([0-9]+)$
RewriteRule ^eventsi\.asp$ /events/e/%1? [R=301,L]

<IfModule mod_security.c>
  # Turn off mod_security filtering.
  SecFilterEngine Off

  # The below probably isn't needed,
  # but better safe than sorry.
  SecFilterScanPOST Off
</IfModule>

<IfModule mod_security.c>
  SetEnvIfNoCase Content-Type \
  "^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
</IfModule>

<IfModule mod_gzip.c>
  mod_gzip_on No
</IfModule>


Messages In This Thread
The best way to re-route old urls - by El Forum - 04-28-2011, 10:01 AM
The best way to re-route old urls - by El Forum - 04-28-2011, 10:24 AM
The best way to re-route old urls - by El Forum - 04-28-2011, 10:29 AM
The best way to re-route old urls - by El Forum - 04-28-2011, 12:10 PM
The best way to re-route old urls - by El Forum - 04-28-2011, 12:38 PM
The best way to re-route old urls - by El Forum - 04-28-2011, 02:13 PM
The best way to re-route old urls - by El Forum - 04-28-2011, 10:29 PM
The best way to re-route old urls - by El Forum - 04-29-2011, 12:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB