mojtabakh18
March 30th, 2017, 02:01
سلام خوبین؟
من برای تست دوباره نویسی لینک با php یا به اصطلاح url rewrite اومدم این صفحه در ایجاد کردم : index.php
کدش اینه
echo $_GET['a'];
میبینید یه کد سادس که در ادرس بار اینطوری بزنیم کار می کنه
index.php?a=1
خب اومدم در htaccess اینو نوشتم :
RewriteEngine on
RewriteRule ^a/([0-9]+) /index.php?a=$1 [NC,L]
در واقع باید وقتی بنویسم a/2/ این فایل اجرا بشه index.php?a=1
ولی این خطا رو میده :
Object not found!The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster (postmaster@localhost).
Error 404
ممنون می شم یکی کمک کنه
من برای تست دوباره نویسی لینک با php یا به اصطلاح url rewrite اومدم این صفحه در ایجاد کردم : index.php
کدش اینه
echo $_GET['a'];
میبینید یه کد سادس که در ادرس بار اینطوری بزنیم کار می کنه
index.php?a=1
خب اومدم در htaccess اینو نوشتم :
RewriteEngine on
RewriteRule ^a/([0-9]+) /index.php?a=$1 [NC,L]
در واقع باید وقتی بنویسم a/2/ این فایل اجرا بشه index.php?a=1
ولی این خطا رو میده :
Object not found!The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster (postmaster@localhost).
Error 404
ممنون می شم یکی کمک کنه