.htaccess->;域参数->;https://example.com/page 正在工作和https://example.com/ 不
我的.htaccess文件有问题。我将随时为当前域添加参数。它确实为你工作,但不是为你工作 我当前的.htaccess.htaccess->;域参数->;https://example.com/page 正在工作和https://example.com/ 不,.htaccess,mod-rewrite,indexing,parameters,dns,.htaccess,Mod Rewrite,Indexing,Parameters,Dns,我的.htaccess文件有问题。我将随时为当前域添加参数。它确实为你工作,但不是为你工作 我当前的.htaccess RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?domain=%{HTTP_HOST}&page=$1 [L,QSA] 我已经试过了。*和。在RewriteRule中,只需添加检查
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?domain=%{HTTP_HOST}&page=$1 [L,QSA]
我已经试过了。*和。在RewriteRule中,只需添加检查Uri的条件,然后使用index.php为其提供服务,而不是使用所示示例使用^(.*)$。你能试试下面的吗。请确保在测试URL之前清除浏览器缓存
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?domain=%{HTTP_HOST}&page=$1 [L,QSA]
RewriteCond %{REQUEST_URI} ^/?$
RewriteRule ^ /index.php?domain=%{HTTP_HOST} [L]
这很有效。非常感谢你。