LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache rewriterule (https://www.linuxquestions.org/questions/linux-server-73/apache-rewriterule-574200/)

mesh2005 08-02-2007 08:19 AM

Apache rewriterule
 
I have been having a trouble adding the following rule:
RewriteRule ^/dir/.*$ http://mydomain.com/index.html
full path to directory dir is: /var/www/dir
full path to index: /var/www/index.html

I want to redirect all requests of any pages under "dir" to index.html but it seems not to be working. Please help.

//mod note. not a networking question. moved to Linux - Server.

satnam888 08-03-2007 02:23 AM

Try:

RewriteRule ^/dir/.*$ /index.html

:)


All times are GMT -5. The time now is 04:26 AM.