php - Managed server .htaccess redirect to folder -
i setting managed server right , have problem .htaccess
file. have few domains pointing managed server via a-record setting , on server have .htaccess
file in root. here how redirect inside .htaccess
looks in case:
rewritecond %{http_host} ^(www\.)?domain\.de [nc] rewriterule ^(.*)$ /folder/$1
all of works fine 1 exception. if open domain in browser shows:
instead of:
i domain ending without /folder
part showing when enters url, while still showing content of /folder
url. on top of unsure if whole thing might have negative impact when comes seo. appreciated.
more information: domains pointing server via a-record. when access domain through browser show me root directory of server. point subfolder have created domain ( 1 holds files domain ) added 2 lines of code .htaccess file in servers root directory. want change if user opens website in or hers browser should show: http://www.domain.de instead of http://www.domain.de/folder/ have 15 websites pointing server , 1 of them working correctly ( 1 based on wordpress ). wordpress website wanted do. shows domain ending .de instead of subfolder on server holds of files particular domain. due fact wordpress version doing want guess must connected .htaccess file within subfolder website. think need line in .htaccess converts: http://www.domain.de/folder/ http://www.domain.de
if open domain in browser shows:
http://www.domain.de/folder/
instead of:
http://www.domain.de/
this happening because telling web server do...
rewritecond %{http_host} ^(www\.)?domain\.de [nc] rewriterule ^(.*)$ /folder/$1
the code above telling web server "take every visitor www.domain.de , redirect them www.domain.de/folder".
i domain ending top level domain showing when enters website.
i believe musunderstand top-level-domain is. top-level-domain .com
, .net
, .org
etc. @ end of every url.
i recommend using this tutorial further understand .htaccess redirects. can modify teaches suit needs...
Comments
Post a Comment