0

I am trying to achieve the following:

All searches at https://example.com/a/* will display file article.php.

For example (links to articles):

https://example.com/a/new-robot-eats-banana 
https://example.com/a/best-shoes-for-mud
https://example.com/a/its-about-time-we-move-to-mars

Will use article.php

echo basename($_SERVER['PHP_SELF']);

Example:

https://example.com/a/new-robot-eats-banana

new-robot-eats-banana

While keeping the url the same.

Is this done using alias?

Alias /a/* article.php
2

0

You must log in to answer this question.

Browse other questions tagged .