use*_*990 6 php xampp mod-rewrite silex
我已经尝试在XAMPP上为Silex应用程序正确设置url重写时搜索多个先前的线程,但仍然无法解决这个问题.这是我想要完成的.
我正在使用XAMPP,这是我的htdocs文件夹的结构:
- xampp
- htdocs
- app1
- app2
- app3 <silex application>
.htaccess file (outside of web folder)
- web
index.php file
Run Code Online (Sandbox Code Playgroud)
我现在可以做http:// localhost:50000/msk/web/cte.我的问题是如何摆脱这种"网络"(即http:// localhost:50000/msk/cte)
我觉得我错过了一些小事,但我无法理解.
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /msk/web/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
LoadModule rewrite_module modules/mod_rewrite.so在我的配置中未注释.我也没有使用虚拟主机.
谢谢
你可以试试 :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /msk/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^cte/url-word$ cte/redirect-page [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
92 次 |
最近记录: |