我有一個簡單的RewriteRule,它在我的本地機器上工作正常,但當我上傳到我的活服務器時,它不起作用。mod-rewrite不能在活服務器上工作
錯誤:
Not Found The requested URL /redirect:/jobs.php/1/field-engineer.php/1/field-engineer.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
的.htaccess:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm $1.php [NC]
RewriteRule jobs/([0-9]+)/(.*)/ jobs.php?id=$1 [NC]
RewriteRule testimonial-details/([0-9]+)/(.*)/ testimonial-details.php?id=$1 [NC]
RewriteRule testimonials/([0-9]+)/(.*)/ testimonials.php?id=$1 [NC]
任何幫助將欣然讚賞。
是,它的工作現場的服務器上。 RewriteRule褒獎/([0-9] +)/(。*)/ testimonials.php?id = $ 1 [NC] ...但其他兩個不是。謝謝 – xmox 2012-03-28 23:57:54
被重寫爲'/ redirect:/ jobs.php/1/field-engineer.php/1/field-engineer.php'的鏈接是什麼? – grifos 2012-03-29 00:01:40
localhost/jobs/1/civil-engineer.html和代碼 - > $ jobs_url = WEBSITE_URL。 '工作/' 。 $ row-> job_id。 '/'。 $ helper-> format_url_keyword($ row-> position)。 '的.html'; – xmox 2012-03-29 00:05:21