Jump to content

How do I mod rewrite to another folder? [RESOLVED]


AdRock

Recommended Posts

I have my main folder with index.php file in there which I have managed to mod rewrite successfully.

I have another folder within the main folder called admin.  In the admin folder I have another index.php file.

When I enter [url=http://www.mydomain.com/admin/]www.mydomain.com/admin/[/url] it doesn't display index.php in the admin folder.

Here is my mod rewrite .htaccess

[code]Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^([A-Za-z0-9\-_]+)/?$ index.php?page=$1
RewriteRule ^gallery/([A-Za-z0-9\-_]+)/([0-9]+)/?$ index.php?page=$1&id=$2
RewriteRule ^([A-Za-z0-9]+)/([0-9\-_]+)/?$ index.php?page=$1&pagenum=$2
RewriteRule ^admin/([A-Za-z0-9\-_]+)/?$ admin/index.php?page=$1 [L][/code]
  • 5 weeks later...
Check with your host, I dought they will though especially if you are on a shared host.

But you can add the following line to your .htaccess file:
[code]DirectoryIndex index.php[/code]

If you want index.php to be your directory index.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.