0

How can I redirect a file system directory to map it to an url ?

I have installed man2html on my web server to access man pages via a website.

apt-get install man2html

I found that it is a cgi script, it was installed in :

/usr/lib/cgi-bin/man/

After installation it was already accessible without neither problems nor configurations ..

http://myurl.com/cgi-bin/man/man2html

I would like to redirect

http://myurl.com/cgi-bin/man/man2html

to

http://myurl.com/manpages

Edit: Here is the ls of the directory:

ls -al /usr/lib/cgi-bin/man
total 88
drwxr-xr-x 2 root root  4096 Feb 28 03:28 .
drwxr-xr-x 3 root root  4096 Feb 27 11:29 ..
-rwxr-xr-x 1 root root 20672 Nov  2  2011 man2html
-rwxr-xr-x 1 root root  8250 Nov  2  2011 mansearch
-rwxr-xr-x 2 root root 19472 Nov  2  2011 mansec
-rwxr-xr-x 2 root root 19472 Nov  2  2011 manwhatis

Knowing that the same domain name is hosting a wordpress blog so in the .htaccess :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RewriteRule ^manpages/?$ /cgi-bin/man/man2html [L]

And I made:

sudo service apache2 reload

It won't work!

4m1nh4j1
  • 4,289
  • 16
  • 62
  • 104

1 Answers1

0

Have you tried doing this?

RewriteEngine On
RewriteRule ^manpages/?$ /cgi-bin/man/man2html [L]
Panama Jack
  • 24,158
  • 10
  • 63
  • 95