Something similar to this will get the job done:
RewriteEngine On RewriteRule ^events/([^/]*)$ /events?pg=$1 [L]
How it is doing is:
- Activating the Rewrite engine
- Matching any request which has the shape occasions/something
- Storing the 'something' (the brackets indicate the match ought to be saved)
- Redirecting towards the ugly form while using saved variable.
- Stopping any more rules from being applied (
Hope this can help.