.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

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -