AdRock Posted October 22, 2006 Share Posted October 22, 2006 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 +FollowSymLinksRewriteEngine onRewriteBase /RewriteRule ^([A-Za-z0-9\-_]+)/?$ index.php?page=$1RewriteRule ^gallery/([A-Za-z0-9\-_]+)/([0-9]+)/?$ index.php?page=$1&id=$2RewriteRule ^([A-Za-z0-9]+)/([0-9\-_]+)/?$ index.php?page=$1&pagenum=$2RewriteRule ^admin/([A-Za-z0-9\-_]+)/?$ admin/index.php?page=$1 [L][/code] Quote Link to comment https://forums.phpfreaks.com/topic/24760-how-do-i-mod-rewrite-to-another-folder-resolved/ Share on other sites More sharing options...
wildteen88 Posted October 23, 2006 Share Posted October 23, 2006 Make sure you have index.php added to the DirectoryIndex directive in the httpd.conf file. Quote Link to comment https://forums.phpfreaks.com/topic/24760-how-do-i-mod-rewrite-to-another-folder-resolved/#findComment-113255 Share on other sites More sharing options...
AdRock Posted November 21, 2006 Author Share Posted November 21, 2006 My website is hosted...Is it possible to check the httpd.conf file? Quote Link to comment https://forums.phpfreaks.com/topic/24760-how-do-i-mod-rewrite-to-another-folder-resolved/#findComment-128189 Share on other sites More sharing options...
wildteen88 Posted November 22, 2006 Share Posted November 22, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/24760-how-do-i-mod-rewrite-to-another-folder-resolved/#findComment-128741 Share on other sites More sharing options...
AdRock Posted November 24, 2006 Author Share Posted November 24, 2006 Done it...had to chenge the regular expressions Quote Link to comment https://forums.phpfreaks.com/topic/24760-how-do-i-mod-rewrite-to-another-folder-resolved/#findComment-129700 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.