Php htaccess重定向,不更改url
如何在不重定向的情况下更改页面url 文件结构:Php htaccess重定向,不更改url,php,apache,.htaccess,redirect,yeoman,Php,Apache,.htaccess,Redirect,Yeoman,如何在不重定向的情况下更改页面url 文件结构: /www /www/app /www/app/index.html /www/app/.htaccess .htaccess Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ^(demo1|demo2)\/?$ app [L] 例如 domain.dev/app (index.html page) domain.dev/app/de
/www
/www/app
/www/app/index.html
/www/app/.htaccess
.htaccess
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^(demo1|demo2)\/?$ app [L]
例如
domain.dev/app (index.html page)
domain.dev/app/demo1 (here i want to open my /index.html page without changing url to it)
domain.dev/app/demo2 (same as demo1 route)
将重写规则更改为:
RewriteRule^(demo1 | demo2)\/?$app/$1[L]
您希望在浏览器中看到什么URL?