在我的应用程序中,我们已经在一些页面上静态编写根目录名称(游戏),这些页面在GUI中显示为链接。现在,无论何时我尝试点击此类网址,都会将其重定向到我无法访问的url1。那么是否有任何可能的方式可以访问url1,而不必在整个应用程序中删除这样的静态名称?在PHP中使用htaccess重写规则
URL 1:
http://abc:8089/gaming/app/test/unique_testing.php
URL 2:
http://abc:8089/app/test/unique_testing.php
我已经尝试了一些htaccess的覆盖规则,但它不是为我工作。 我现在htaccess的样子如下:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase/
RewriteRule ^gaming(/.*|)$ /$1 [L,NC]
结构:
/var/www/html/gaming/app/test/unique_testing.php
/var/www/html/gaming/.htaccess
你试过只传一个参数吗?例如, http:// abc:8089/app/ –
抱歉,我无法获得您的要点 –
/gaming/app/test /到文件 –