我有两个不同的.htaccess文件,每个文件做不同的事情,当我把它们合并在一起时,它们不会一起工作。结合了两个.htaccess重写文件
第一个让我进入www.mydoman.com/test,并将它意味着www.mydomain.com/index.php?page=test
RewriteRule ^([A-Za-z0-9-_]+)/?$ index.php?subclass=$1 [NC,L]
RewriteRule ^.* index.php [NC,L]
第二个文件切断从延伸.html和.php文件等都可以使用www.mydomain.com/about insted的www.mydoman.com/about.php
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /cl_clone
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule^%1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule^%{REQUEST_URI}.php [L]
# e.g. example.com/foo will display the contents of example.com/foo.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L,QSA]
的有没有办法让这两个在一个htaccess的共同努力文件?