John Raptis
John Raptis

Reputation: 197

How can I do a God-tier url rewrite?

I'm using httpd on centos8, and I would like to put this rewrite into httpd.conf if possible!

I would like to make it so that a url like this:

www.mydomain.com/12345

gets rewritten as:

www.mydomain.com/folder/page.php?param=12345

I keep taking stabs at it and failing. Can the good people of stackoverflow help me out?

Upvotes: 0

Views: 52

Answers (1)

fnanfne
fnanfne

Reputation: 11

I believe you've found a solution but if anyone else has a similar requirement, it might be addressed with something like...

<VirtualHost *>
 ServerName www.mydomain.com/12345
 Redirect 301 www.mydomain.com/folder/page.php?param=12345
</VirtualHost>

Upvotes: 1

Related Questions