Make index.php catch all URLs while inside a directory?

Go To StackoverFlow.com

1

So I have the following .htaccess file contents from my other project which is accessed at http://www.example.com/.

Options -MultiViews

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L,NC,QSA]
</IfModule>

Now the above works quite fine but now I have a new problem. I want to use the same concept (redirecting all links to index.php) but this time, it needs to be inside a directory. (e.g. http://www.myothersite.com/thisfolder/)

So I tried creating a .htaccess file inside http://www.myothersite.com/thisfolder/. Question is, how do I modify the above code so that it points all links to index.php inside thisfolder?

Just for reference see below:

myothersite.com
 '-> thisfolder
      '-> .htaccess
      '-> index.php

I need to place the .htaccess file inside thisfolder since I don't want it messing with the other projects I have on other folders. I want to keep all the action specifically inside http://www.myothersite.com/thisfolder/.

Can anyone help me out?

2012-04-05 22:04
by Propeller


1

Have you tried this?

RewriteRule . /thisfolder/index.php [L,NC,QSA]

2012-04-05 22:07
by RobIII
Ads