1
我的網址有問題,當網點出現在網址時它給出了404錯誤。在網址中給點錯誤
網址:http://example.com/Samsung-Galaxy-Mega-5.8
我使用htaccess的一些代碼,但它不能正常工作。
RewriteRule ^([a-zA-Z_\-]+)/?([a-zA-Z0-9\-=&[email protected]\.]*)$ /$1.php?$2 [QSA,L]
編輯(從評論複製):
RewriteEngine on
Options -Indexes
#RewriteCond %{HTTP_HOST} ^([a-z0-9-A-Z_]*).([a-z]*)$
#RewriteRule ^(.*)$ %1.%2/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^([a-zA-Z0-9_-]+)$ show_mobile.php?bid=$1&brandname=$2
RewriteRule ^([a-zA-Z0-9\-]+)-([a-zA-Z0-9\-]+)$ show_mobile.php?bid=$2&brandname=$1
我們展示更多的你[的.htaccess。這本身就是在尋找'/?',這在你給的例子中不存在。 –
這裏是我的htaccess全碼:上RewriteEngine敘述 選項-Indexes #RewriteCond%{HTTP_HOST} ^([A-Z0-9-A-Z _] *)([AZ] *)$ #RewriteRule ^(。 。*)$ HTTP:!//www.%1.%2/$1 [L,R = 301] 的RewriteCond%{REQUEST_FILENAME} -f 的RewriteCond%{REQUEST_FILENAME} -D- #RewriteRule^([a-zA-Z0-9 _-] +)$ show_mobile.php?bid = $ 1&brandname = $ 2 RewriteRule ^([a-zA-Z0-9 \ - ] +) - ([a-zA-Z0- 9 \ - ] +)$ show_mobile.php?bid = $ 2&brandname = $ 1 –