我有一個奇怪的問題。一切都很好,直到昨天,突然發現這個問題。正在重定向的Codeigniter URL或額外的部分被添加到URL
的網站是在這裏: http://www.famtripsandinspectionvisits.com/all_trips
如果你訪問網頁上面,然後點擊「印度喀拉拉邦的」鏈接,就應該帶你到以下頁面。
http://www.famtripsandinspectionvisits.com/trips/old_trips/india_kerala
然而,瀏覽器重定向到這個頁面: http://www.famtripsandinspectionvisits.com/all_trips/old_trips/india_kerala?/trips/old_trips/india_kerala 這表明以下部分加入是多餘的。 all_trips/old_trips/india_kerala?
我檢查了我的.htaaccess並將其重置爲默認值,但它仍然不會影響它。我檢查了我的cofnig.php的基礎網址,一切都和以前一樣。如果任何人都可以幫忙,我會認真的。
我的.htaccess文件
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Redirect 301 /invest.php http://www.famtripsandinspectionvisits.com/investment_opportunity
Redirect 301 /buyers.php http://www.famtripsandinspectionvisits.com/buyers
Redirect 301 /trips.php http://www.famtripsandinspectionvisits.com/all_trips
Redirect 301 /sellers.php http://www.famtripsandinspectionvisits.com/sellers
Redirect 301 /contact.php http://www.famtripsandinspectionvisits.com/contact_us
Redirect 301 /about.php http://www.famtripsandinspectionvisits.com/about_us
Redirect 301 /login.php http://www.famtripsandinspectionvisits.com/login
Redirect 301 /trip-kerala.php http://www.famtripsandinspectionvisits.com/trips/old_trips/india_kerala
Redirect 301 /trip-burundi.php http://www.famtripsandinspectionvisits.com/trips/up_coming_trips/burundi_africa
Redirect 301 /register.php http://www.famtripsandinspectionvisits.com/register
Redirect 301 /trips http://www.famtripsandinspectionvisits.com/all_trips
我routes.php文件
$route['default_controller'] = "site";
$route['404_override'] = '';
$route['fam_admin'] = "fam_admin/login";
/* End of file routes.php */
/* Location: ./application/config/routes.php */
親切的問候
兩者不會忽略返回404的權利嗎?也許這是原因?試着讓你的控制器的路徑工作,以避免404並告訴我們它是否工作? –
您可以發佈您'.htaccess'和'routes.php'文件? – jeroen
我覺得probem與重定向或某處網址多餘部分將被加入這個被添加在那裏不知道該怎麼。 – Sahil