.htaccess - htaccess and Mod_rewrite in subdomains -


in htaccess have set rewrite url's query string doesn't show (pretty url's) seems if site placed in subdomain, brings blank page vice going correct page. subdomains affect way works or issue?

rewriteengine on rewriterule ^documents/([^/]+)/?$ documents.php?p=$1 rewritecond %{request_filename} !-f rewritecond %{request_filename}.php -f rewriterule ^(.*)$ $1.php [nc,l] 

converting folder/documents.php?p=value www.mywebsite.com/folder/documents/variable (removing .php?p=value)

subdomain equivalent: subdomain.mywebsite.com/folder/documents/variable

try turning multiviews option off using code:

options -multiviews rewriteengine on  rewriterule ^documents/([^/]+)/?$ documents.php?p=$1 [l,qsa,nc]  rewritecond %{request_filename} !-f rewritecond %{request_filename}.php -f rewriterule ^(.*)$ $1.php [l] 

option multiviews used apache's content negotiation module runs before mod_rewrite , makes apache server match extensions of files. /file can in url serve /file.php.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -