我们有一个运行在Symfony上的网站,是由比我更有能力的人开发的。然而,我在WordPress方面相当熟练,并将在该网站上安装一个博客。
目前,网站的根目录运行在Symfony上,但我希望WordPress接管而不必触及Symfony核心。本质上,我想在www目录的子目录下安装WordPress,比如说
这是我当前的.htaccess文件的内容。
目前,网站的根目录运行在Symfony上,但我希望WordPress接管而不必触及Symfony核心。本质上,我想在www目录的子目录下安装WordPress,比如说
www/wordpress/
,并让htaccess将其指向作为我的域名根目录。但是,我仍然希望使用Symfony安装的一个功能,我们称之为myfeature
。当我访问mydomain.com/myfeature/
时,我希望htaccess将其指向运行于Symfony的mydomain.com/index.php/myfeature
。这是我当前的.htaccess文件的内容。
<IfModule mod_rewrite.c>
RewriteEngine On
# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteCond %{REQUEST_URI} !\.php
#RewriteCond %{REQUEST_URI} !\.php
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ /index.html [QSA]
RewriteRule ^([^.]+)$ /$1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ /index.php [QSA,L]
# hidden frontoffice controller
RewriteRule ^index\.php/(.*)$ /index.php [QSA,L]
# fo controllers
RewriteRule ^frontend\.php/(.*)$ /frontend.php [QSA,L]
RewriteRule ^frontend_dev\.php/(.*)$ /frontend_dev.php [QSA,L]
</IfModule>
Thank You