.htaccess - How to rewrite rules for two subfolders using mod_rewrite -
i need this:
########## site 1 rewriteengine on rewritebase /mysite1 rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?url=$1 [l,qsa] ########## site 2 rewriteengine on rewritebase /mysecondsite rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?url=$1 [l,qsa]
the problem can utilize 1 .htaccess
file using helicon isapi_rewrite 3 on windows 2003 server.
is there way combine both .htaccess files in 1 of them , making them work properly?
i have tried test if mysite
work without rewritebase
, seems not work:
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^mysite1/(.*)$ index.php?url=$1 [l,qsa]
thanks.
than can't come improve this:
########## site 1 rewriteengine on rewritecond %{http:host} ^www\.website\.com$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /mysite1/index.php?url=$1 [l,qsa] ########## site 2 rewriteengine on rewritecond %{http:host} ^www\.demo\.website\.com$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /mysecondsite/index.php?url=$1 [l,qsa]
.htaccess mod-rewrite isapi isapi-rewrite isapi-redirect
No comments:
Post a Comment