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
Maciek Semik
  • 139
  • 6
  • see: [Apache rewrite URL if accessed in specific directory](https://serverfault.com/questions/94736/apache-rewrite-url-if-accessed-in-specific-directory) – Luuk Jul 21 '23 at 16:58
  • Have you tried something like `FallbackResource /path/to/article.php` Note this path starts from documentroot not from root filesystem. – Daniel Ferradal Aug 03 '23 at 10:42

0 Answers0