Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

Mod Rewrite

Post new topic   Reply to topic    Apache Forum Index -> Apache

View previous topic :: View next topic  
Author Message

Joined: 19 Jul 2018
Posts: 2
Location: United States

PostPosted: Tue 24 Jul '18 22:31    Post subject: Mod Rewrite Reply with quote

hi, I am a complete newbie, and have no idea how to do this. We have Apache 2.4 running on Linux.

We have a blog system. The blog are numbered, like this:

I call those into an html page, using:
<!--#include virtual="/cart/cgi/mini_blog.cgi?no=19" -->

But the pages are named in a user-friendly manner, like




Can someone help me out with a mod rewrite, or is that asking too much? Thanks so much for looking at this question.
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6452
Location: Germany, Next to Hamburg

PostPosted: Tue 07 Aug '18 11:59    Post subject: Reply with quote

How do you like to match the url with a name to a number? if your cgi can do that you might rewrite the whole blog to the cgi. The urls then must be stored in the programming or in a database.

RewriteEngine on

RewriteBase /blog/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /cart/cgi/mini_blog.cgi [QSA]

it is kind of the way wordpress rewrites the urls.
See https://codex.wordpress.org/htaccess
Back to top

Joined: 19 Jul 2018
Posts: 2
Location: United States

PostPosted: Tue 07 Aug '18 17:13    Post subject: Reply with quote

Thanks, that makes sense. We hired someone to do it, but I will suggest this, since it's still not working properly.
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1