我需要從製造SEO友好的URL與URL rewriting:創建SEO友好的URL與URL重寫
http://www.myurl.com/subfolder/index.php?service=example1&location=city1
http://www.myurl.com/subfolder/cars.php?service=example1&location=city1
http://www.myurl.com/subfolder/bicycle.php?service=example1&location=city1
到
http://www.myurl.com/subfolder/example1/example2/index.html
http://www.myurl.com/subfolder/example1/example2/cars.html
http://www.myurl.com/subfolder/example1/example2/bicycle.html
我的URL重寫不會在所有的工作,
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^index/(\w+)/?$ index.php?service=$1&location=$2
RewriteRule ^cars/(\w+)/?$ cars.php?service=$1&location=$2
RewriteRule ^bicycles/(\w+)/?$ bicycles.php?service=$1&location=$2
我應該在哪裏放置.htaccess文件?在根目錄或子文件夾中?
你確定你不想要:http://www.myurl.com/subfolder/cars/example1/city1.html? – 2012-04-14 07:56:01