Forums / Unrelated / Offtopic / .htaccess

for events.php from the old LDU

aiwass
#1 2009-05-01 01:17
If you were using the old Events & Calendar system back in the day of LDU and even earlier versions on Seditio and have a really good ranking on Google on your events.php?XXXXXX etc. then his little .htacees string will solve Googles 404 issue since events.php in the root level doesn't exist any more.

RewriteEngine on
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{QUERY_STRING} ^c=(.*)$ [NC]
RewriteRule ^events.php$ http://www.yourdomain.com/plug.php\?e=events&c=%1 [L,R=301]

RewriteCond %{QUERY_STRING} ^f=old&c=(.*)$ [NC]
RewriteRule ^events.php$ http://www.yourdomain.com/plug.php\?e=events&f=old&c=%1 [L,R=301]

RewriteCond %{QUERY_STRING} ^f=upcoming&c=(.*)$ [NC]
RewriteRule ^events.php$ http://www.yourdomain.com/plug.php\?e=events&f=upcoming&c=%1 [L,R=301]

RewriteCond %{QUERY_STRING} ^m=details&id=(.*)$ [NC]
RewriteRule ^events.php$ http://www.yourdomain.com/plug.php\?e=events&m=details&id=%1 [L,R=301]

RewriteRule events.php$ http://www.yourdomain.com/plug.php\?e=events [R=301,L]
Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com