Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加类似 mediawiki 虚拟路径和真实路径分离 #1

Open
GoogleCodeExporter opened this issue Apr 14, 2016 · 5 comments
Open

Comments

@GoogleCodeExporter
Copy link

假设在目录 /home/web 中解压 mediawiki tarball,重命名为 m, 那在 
mediawiki的配置 /home/web/m/LocalSettings.php 中设置:

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath       = "/m";
$wgScriptExtension  = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;

## The relative URL path to the skins directory
$wgStylePath        = "$wgScriptPath/skins";


以上配置可以实现:

使用 http://ip/wiki/ 来访问 mediawiki,其他 URL 
的前面自动会加上 /wiki/ 。

cidc 能否添加类似的功能?

Original issue reported on code.google.com by [email protected] on 18 Apr 2012 at 5:22

@GoogleCodeExporter
Copy link
Author

为什么需要这样的功能呢?

Original comment by yaojungang on 19 Apr 2012 at 2:24

@GoogleCodeExporter
Copy link
Author

需要看您的应用场景,已决定是否添加此功能

Original comment by yaojungang on 19 Apr 2012 at 2:29

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

我们内部系统(有wiki、redmine等)需要一个统一的域名(假设
为internal)作为入口,访问方式为:

http://internal/wiki/
http://internal/redmine/

,所以想把 cidc 也用类似的方式集成和访问:

http://internal/cidc/

Original comment by [email protected] on 19 Apr 2012 at 2:37

@GoogleCodeExporter
Copy link
Author

http://internal/cidc/

这种方式访问时,在 nginx 
下配置比较麻烦,比如跳转的时候或者是静态文件的相对地��
�不会自动加上 /cidc/,需要找出静态文件的 URL 做 
rewrite,类似:

        rewrite ^(/js/.*)$ /cidc$1 last;
        rewrite ^(/style/.*)$ /cidc$1 last;


Original comment by [email protected] on 19 Apr 2012 at 2:40

@GoogleCodeExporter
Copy link
Author

这个功能可以做

Original comment by [email protected] on 20 Apr 2012 at 4:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant