Reputation: 99
I want the following two routes to be set in this way:
/post/123
-> app.php
/?p=123
-> app.php?p=123
Currently what I have in .htaccess is
RewriteRule ^$ app\.php [L]
RewriteRule post/(.*)$ app\.php [L]
How can I achieve route 2?
Upvotes: 1
Views: 435
Reputation: 785098
Try this in one rule:
RewriteEngine On
RewriteRule ^(post/.+)?$ app.php [L,NC]
Upvotes: 1