有人能帮我一个htaccess规则这个应用程序的格式。
以下是我的文件结构:
/api
- /1.0 (this is a php project, a backend rest api of sorts to the frontend)
- /other-php-folders
- /...(lots of stuff)
- /public
- /...(lots of assets etc)
- /index.php
- /.htaccess (ignore for now)
/src (this contains an angularjs compiled website)
- /assets
- /cool-asset.js
- /cool-asset2.css
- /cool-asset3.png
- /index.html
- /.htaccess
/.htaccess因此,我基本上想从根.htaccess文件中得到什么:
另外一个我喜欢的很好的功能:
任何帮助都很感激。提前谢谢。
发布于 2014-09-22 00:33:55
我做了我自己的解决方案,但能否有人评论,并让我知道这是好的(它的工作),或如果有更好的解决方案。
干杯。
/.htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/api
RewriteRule ^(.*)$ /src/$1 [L]/src/.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]https://stackoverflow.com/questions/25965201
复制相似问题