我想在我的所有网站URL栏中附加一个字符串示例(#center)
例如我想改变
到
我复制了修改的
RewriteRule ^/?(.*) http://example.com/$1?#center [L,R,NE]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} !(^|&)#center(&|$) [NC]
RewriteRule ^ %{REQUEST_URI}?#center [L,QSA,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
But it do not work
Can these be achieved using php .htaccess?
Big thanks for your time