我正准备推出一个网站。我还在学习如何使用.htaccess,我遇到了一些麻烦。新的wordpress站点位于/ wpfiles目录中。试图访问/ wpfiles被重定向到/ main。似乎访问/ wpfiles中的index.php文件会触发下面的重写规则,但是访问 / wpfiles中的任何其他文件或目录并不会。
我想打开/ wpfiles目录,以便我能够查看该站点并将其发送给客户端。这是public_html目录中现有的.htaccess文件。
var React = require('react');
var ReactDOM = require('react-dom');
var ReactBootstrap = require('react-bootstrap');
var configtabs = {
ctabs: [
{
key: 31,
id: "analysis_method_tab",
title: "Analysis Method",
content: "Loading Analysis Method Content . . ."
},
{
key: 32,
id: "categorization_tab",
title: "Categorization",
content: "Loading Categorization Content . . ."
},
{
key: 33,
id: "custom_ngs_template",
title: "Custom NGS Template",
content: "Loading Custom NGS Template Content . . ."
}
]
};
var HomeTabContent = React.createClass({
render() {
return(
<div> On Click Home Content</div>
);
}
});
var AnalysisWorkflowTabContent = React.createClass({
render() {
return(
<div> On Click Analysis Workflow Content </div>
);
}
});
var SubTabsHolderComponent = React.createClass({
getInitialState() {
return {
selSubTabkey:31
};
},
handleSelectSubTab(selSubTabkey) {
//alert('selected subtab' + selSubTabkey);
this.setState({selSubTabkey});
},
render() {
var Tabs = ReactBootstrap.Tabs,
Tab = ReactBootstrap.Tab;
return(
<Tabs activeKey={this.state.selSubTabkey} animation={true} tabWidth={2} paneWidth={5} position="left" onSelect={this.handleSelectSubTab}>
{
this.props.subTabs.map(function (ctab) {
return (
<Tab eventKey={ctab.key} id={ctab.id} title={ctab.title}>
{
ctab.key===this.state.selSubTabKey && <EachSubTabContent subTabKey={ctab.key} id={ctab.id} title={ctab.title}/>
}
</Tab>
);
},this)
}
</Tabs>
);
}
});
var EachSubTabContent = React.createClass({
render() {
var subTabKey=this.props.key;
var id=this.props.id;
var title=this.props.title;
return(
<div> get data for '{title}' tab and then create its components like tree or accordian.for each accordian onclick it will fetch sub data like for track it will fetch track data and will display it in table </div>
);
}
});
const SureCallMainTabs = React.createClass({
getInitialState() {
return {
selkey: 1
};
},
handleSelect(selkey) {
//alert('selected ' + selkey);
this.setState({selkey});
},
render() {
var ctabs = this.props.configtabs.ctabs;
var stabs = this.props.supptabs.stabs;
var Tabs = ReactBootstrap.Tabs,
Tab=ReactBootstrap.Tab;
return (
<Tabs activeKey={this.state.selkey} animation={false} position="top" onSelect={this.handleSelect}>
<Tab eventKey={1} id="home_tab" title="Home">
{
this.state.selkey === 1 && <HomeTabContent />
}
</Tab>
<Tab eventKey={2} id="analysis_workflow" title="Analysis Workflow">
{
this.state.selkey === 2 && <AnalysisWorkflowTabContent />
}
</Tab>
<Tab eventKey={3} id="configure_setting" title="Configure Setting" >
{
this.state.selkey === 3 && <SubTabsHolderComponent subTabs = {ctabs}/>
}
</Tab>
</Tabs>
);
}
});
ReactDOM.render(<SureCallMainTabs configtabs={configtabs} supptabs={supptabs}/>, document.getElementById("react_tabs"));
我的/ wpfiles .htaccess文件如下:
RewriteOptions inherit
RewriteEngine on
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName siteurl.com
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "http\:\/\/siteurl\.com\/main\/" [R=301,L]
为了只从重写规则中豁免/wpfiles/index.php,我需要调整什么?
提前感谢您的帮助!