if you find yourself writing the same if statement over and over with different values, you can usually generalize it:
```
full_path = requestObj.path
for page_type in ("/_history", "/_edit):
    if full_path.startswith(page_type):
        page_id = full_path[len(page_type):]
```