You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oliver Kirchel <ki...@gutenberg-rz.de> on 2005/05/31 16:37:05 UTC

[users@httpd] Apache & mod_rewrite

Hi,
I have a problem with mod_rewrite.

I want to type http://www.test.com/shop/ and the URL should go to
http://www.test.com/perl/shop.pl , but in the browser you should only
see the first URL http://www.test.com/shop/ .

How can I do this ?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache & mod_rewrite

Posted by Aman Raheja <ar...@techquotes.com>.
Without mod_rewrite:

ScriptAlias <abs-path>/perl/ /shop/
<Directory <abs-path>/perl/>
    DirectoryIndex shop.pl
</Directory>

So when someone hits the http://www.test.com/shop/, they will actually 
access perl/shop.pl - wherever it is on the filesystem

With mod_rewrite, once you rewrite the /shop/ to /perl/shop.pl, that's 
what the browser will show, since rewrite does pattern match and 
substitution.
HTH
Aman Raheja
http://www.techquotes.com

Oliver Kirchel wrote:

>Hi,
>I have a problem with mod_rewrite.
>
>I want to type http://www.test.com/shop/ and the URL should go to
>http://www.test.com/perl/shop.pl , but in the browser you should only
>see the first URL http://www.test.com/shop/ .
>
>How can I do this ?
>  
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org