Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/244.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php htaccess重定向,不更改url_Php_Apache_.htaccess_Redirect_Yeoman - Fatal编程技术网

Php htaccess重定向,不更改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

如何在不重定向的情况下更改页面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/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?