apache - Rewrite rule for subdomain and folders -


i need write rewrite rules apache use subdomains. rules should based on:

subdomain.domain.com => /home/domain/docs/some_folder/file.php?subdomain=subdomain subdomain.domain.com/edit => /home/domain/docs/some_other_folder/file.php subdomain.domain.com/dashboard/display/id => /home/domain/docs/some_other_folder2/file.php?param1=display&param2=id 

i using ajax calls on site not going work, understood searching internet. hint on really helps.

i appreciate help! in advance.

i'm gonna try

rewriteengine on rewritebase /  rewritecond %{http_host} !^subdomain.domain.com$ rewriterule .* - [l]  rewritecond %{http_host} (.*) rewriterule ^$  /home/docs/some_folder/file.php?subdomain=%1 [l,qsa] rewriterule ^edit$  /home/docs/some_other_folder/file.php [l] rewriterule ^dashboard/(\w+)/(\w+) /home/docs/some_other_folder2/file.php?param1=$1&param2=$2 [qsa,l] 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -