English 中文(简体)
2. 替代规则
原标题:RewriteRule to point to subdirectory

im trying to install phprojekt 6.0.4. I see the directory structure doesnt allow to put the whole content into my public html folder and directly access it, as it has a htdocs folder in which normally my vhost docroot conf should point to.

So i want to change the .htaccess file in the root directory so every access to the root directory internally redirects to htdocs/ folder.

如果没有500名东帝汶人,就无法做到这一点。

我将这两条线改头。

RewriteEngine On
RewriteRule / htdocs/

So i whenever someone access the root folder of phprojekt, apache should point to htdocs/, it like trying to change the docroot from the root to the subfolder htdocs/. How do i get this running?

最佳回答

假设你不能仅仅改变文件Root,就试图这样做:

RewriteEngine On
RewriteCond %{REQUEST_URI} !htdocs
RewriteRule (.*) htdocs/$1
问题回答

暂无回答




相关问题
URL rewrite in IIS6 - Third party tools

I have collected the following api/sdk/whatever which provide modules for doing url rewriting in IIS 5/6/7. Some are free-open source and some require $. I haven t tried any of them. I would like to ...

Rewrite spring-security redirect URLs

I m trying to get Tuckey UrlRewriteFilter to tidy up URLs for my webapp. One problem I ve got is that when spring-security notices that an anonymous user is trying to access a protected resource it ...

ASP.NET Friendly URLs

In my research, I found 2 ways to do them. Both required modifications to the Application_BeginRequest procedure in the Global.Asax, where you would run your code to do the actual URL mapping (mine ...

Could I get by HttpModule the URL that contains * before?

My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...

Domains & Foreward Slash

This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....

URL Mod-Rewrite

I currently have a working URL: http://example.com/security-services.php?service=fixed-camera-surveillance and then I have PHP say, $_REQUEST[ service ] to do some stuff... But I d like to ...

热门标签