How can I list the path to another if the user doesn't know that path?

I thought I could do it with a rewrite, but I can't seem to find any information on this. I want to do this.

/path/to/my/program/index.php

I want to use a link to use eg.

/forum/index.php

Is it possible?

+2


source to share


2 answers


Yes, if you are using apache as webserver mod_rewrite it might be possible.
Depending on what you want to achieve, it might also be that a simple Alias will do the trick.



Alias /forum /path/to/my/program

      

+1


source


Try this in your .htaccess file:

RewriteEgnine on
RewriteRule ^forum/(.*) path/to/my/program/$1 [L]

      



This will rewrite any request that the url path starts with /forum/…

, moreover, but starting with /path/to/my/program/…

.

0


source







All Articles