php - Sub directory as root directory based on condition -
i in bit problem htacess. have htacess in root -
options +followsymlinks rewriteengine on rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule ^.*$ ./index.php so whatever in url straight nail on index.php in root directory.
now, have folder named "test".
currently when type http://example.com/test/ hits on http://example.com/index.php want when nail http://example.com/test/ nail http://example.com/test/index.php not root directory.
that means when /test/ on url, tried several solutions none working!
in localhost, set root htacess in "test" folder , working not working in server.
please help , in advance.
found solution myself :d
options +followsymlinks rewriteengine on rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule ^test/ test/index.php [l,nc] rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule ^ /index.php [l] php .htaccess
No comments:
Post a Comment