我正在尝试重写 URL 并使用下面提到的代码。但是我在我的页面上收到 404 错误,下面给出的除外。
Options +FollowSymLinks
RewriteEngine on
rewritecond %{http_host} ^phoolwala.net [nc]
rewriterule ^(.*)$ http://www.phoolwala.net/$1 [r=301,nc]
#RewriteRule ^index.php?$ /phoolwala.net/? [R=301]
RewriteRule ^index.php?$ /? [R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#below line gives error in dhtml editor
#RewriteRule ^(.*)\.html$ $1.php [nc]
#RewriteRule ^(.*)/$ $1.php [L]
RewriteRule ^register/$ register.php [L]
RewriteRule ^register$ register.php [L]
RewriteRule ^my-account/$ my-account.php [L]
RewriteRule ^my-account$ my-account.php [L]
RewriteRule ^track-order/$ track-order.php [L]
RewriteRule ^track-order$ track-order.php [L]
RewriteRule ^edit-profile/$ edit-profile.php [L]
RewriteRule ^edit-profile$ edit-profile.php [L]
RewriteRule ^testimonials/$ testimonials.php [L]
RewriteRule ^testimonials$ testimonials.php [L]
RewriteRule ^sitemap/$ sitemap.php [L]
RewriteRule ^sitemap$ sitemap.php [L]
RewriteRule ^login/$ login.php [L]
RewriteRule ^login$ login.php [L]
RewriteRule ^my-account/$ my-account.php [L]
RewriteRule ^my-account$ my-account.php [L]
RewriteRule ^edit-profile/$ edit-profile.php [L]
RewriteRule ^edit-profile$ edit-profile.php [L]
RewriteRule ^reminders/$ reminders.php [L]
RewriteRule ^reminders$ reminders.php [L]
RewriteRule ^view-my-orders/$ view-my-orders.php [L]
RewriteRule ^view-my-orders$ view-my-orders.php [L]
RewriteRule ^order-details/$ order-details.php [L]
RewriteRule ^order-details$ order-details.php [L]
RewriteRule ^contact-us/$ contact-us.php [L]
RewriteRule ^contact-us$ contact-us.php [L]
RewriteRule ^logout/$ logout.php [L]
RewriteRule ^logout$ logout.php [L]
RewriteRule ^cart/$ cart.php [L]
RewriteRule ^cart$ cart.php [L]
RewriteRule ^international-products/(.*)/(.*)/(.*)/ international-products.php?cid=$1&id=$2&pageno=$3 [L]
RewriteRule ^international-products/(.*)/(.*)(.*)/ international-products.php?cid=$1&id=$2&pageno=$3 [L]
RewriteRule ^products/(.*)/(.*)/ products.php?id=$1&pageno=$2 [L]
RewriteRule ^products/(.*)/(.*) products.php?id=$1&pageno=$2 [L]
RewriteRule ^price/(.*)/(.*)/(.*)/ productsprice.php?from=$1&to=$2&pageno=$3 [L]
RewriteRule ^price/(.*)/(.*)(.*)/ productsprice.php?from=$1&to=$2&pageno=$3 [L]
RewriteRule ^page/(.*)/(.*)/ page.php?alias=$1&id=$2 [L]
RewriteRule ^page/(.*)/(.*) page.php?alias=$1&id=$2 [L]
RewriteRule ^international-product/(.*)/(.*)/(.*)/ international-product-details.php?cid=$1&cat=$2&id=$3 [L]
RewriteRule ^international-product/(.*)/(.*)/(.*) international-product-details.php?cid=$1&cat=$2&id=$3 [L]
RewriteRule ^product/(.*)/(.*)/(.*)/ product-details.php?cat=$1&alias=$2&id=$3 [L]
RewriteRule ^product/(.*)/(.*)/(.*) product-details.php?cat=$1&alias=$2&id=$3 [L]
RewriteRule ^search/(.*)/(.*)/(.*)/ productsearch.php?keyword=$1&cat=$2&pageno=$3 [L]
RewriteRule ^search/(.*)/(.*)(.*)/ productsearch.php?keyword=$1&cat=$2&pageno=$3 [L]
RewriteRule ^international/(.*)/ international.php?cid=$1 [L]
RewriteRule ^international/(.*) international.php?cid=$1 [L]
但除了下面的代码没有任何工作请帮我更新代码。
RewriteRule ^product/(.*)/(.*)/(.*)/ product-details.php?cat=$1&alias=$2&id=$3 [L]
RewriteRule ^product/(.*)/(.*)/(.*) product-details.php?cat=$1&alias=$2&id=$3 [L]