php - Cannot access subpage url of subdomain -
i did rewrite rule wildcard subdomain access allow me access countries of list page follows:
rewritecond %{http_host} ^(.+)\.mydomain\.net$ rewritecond %{http_host} !^www\.mydomain\.net$ rewritecond %{request_uri} !^.*\.(jpe?g|png|gif|bmp)$ [nc] rewriterule (.*) pages/list.php?country=%1 [l]
this working fine.
now. rewrite rule access page on domain keep getting referred list page.
rewriterule ^ad/([a-za-z0-9-]+)?$ pages/details.php?alias=$1 [nc,l]
my end result access eg: http://us.mydomain.net/ad/alias keeps referring me list page.
updated rewrite rules(as of 14 may)
rewriteengine on <ifmodule mod_headers.c> header set access-control-allow-origin "*" </ifmodule> rewriterule ^cat/([a-za-z0-9-]+)/?$ ?category=$1 [l,qsa,nc] rewritecond %{request_filename} !-f rewritecond %{http_host} ^(.+)\.ibizportal\.net$ rewritecond %{http_host} !^www\.ibizportal\.net$ rewritecond %{request_uri} !^.*\.(jpe?g|png|gif|bmp)$ [nc] rewriterule (.*) pages/list.php?country=%1 [l]
change first rule to:
rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -d rewriterule ^ - [l] rewriterule ^cat/([a-za-z0-9-]+)/?$ ?category=$1 [l,qsa,nc] rewritecond %{http_host} ^((?!www).+)\.mydomain\.net$ [nc] rewritecond %{request_uri} !\.(?:jpe?g|png|gif|bmp|php)$ [nc] rewriterule (.+) pages/list.php?country=%1 [l,qsa]
Comments
Post a Comment