如何使用的.htaccess重写URL仅针对特定的网页?我怎么可以重写我的网址只有某些页面
例如,我想这对网站或在所有页面,但index.php文件的网页的index.php但不休息的工作。
我运行中的问题与子域和PHP脚本在那里,我使用会搞乱的东西URL重定向。下面是我想要使用的那种脚本的一个例子。
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase/
## If the request is for a valid directory
RewriteCond %{REQUEST_FILENAME} -d [OR]
## If the request is for a valid file
RewriteCond %{REQUEST_FILENAME} -f [OR]
## If the request is for a valid link
RewriteCond %{REQUEST_FILENAME} -l
## don't do anything
RewriteRule^- [L]
RewriteRule ^([^/]+)/([^/]+)/?$ index.php/?node=$1&id=$2 [L,QSA]
RewriteRule ^([^/]+)/?$ index.php/?node=$1 [L,QSA]
任何人都可以点我在正确的方向?
你的问题给出了一些信息,但还远远不够。如果你问,是因为在问题设置的规则不起作用,所以这是有帮助没有。发布一些完整的URL示例,不要期望人们猜测你需要什么。 –