Reputation: 825
I have one file -- seminars.cgi -- that does all of the work in my app, including routing. (It's written as a CGI app in Go.) A typical call to it might look like this:
https://example.com/seminars.cgi/seminar/1234
I'm wondering whether there's any way I can use .htaccess to drop the seminars.cgi part, and instead have a call like this:
https://example.com/seminar/1234
My attempts have been futile:
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteRule ^example.com/(.*?)$ example.com/seminars.cgi/$1 [NC,L,QSA]
If I navigate to https://example.com/seminar/1234, the browser reports a 404, "Not found".
Any obvious issues?
Thanks in advance.
Upvotes: 0
Views: 55
Reputation: 7476
Try with below rule, I don't think that you need to specify domain name inside rule.
RewriteEngine On
RewriteRule ^(.*)$ seminars.cgi/$1 [NC,L,QSA]
Upvotes: 1