dflow Posted October 14, 2009 Share Posted October 14, 2009 how can film.php?id=1 i would like the url to be: film/King_Kong so i want to replace '1' with the film name from where do i call the name? Quote Link to comment https://forums.phpfreaks.com/topic/177681-mod-rewrite-how-to-get-name-according-to-id/ Share on other sites More sharing options...
corbin Posted October 14, 2009 Share Posted October 14, 2009 You would have to fetch the content based on the name. Like, you would have to pass the name to the URL and then check the DB based on the name. Quote Link to comment https://forums.phpfreaks.com/topic/177681-mod-rewrite-how-to-get-name-according-to-id/#findComment-937015 Share on other sites More sharing options...
dflow Posted October 14, 2009 Author Share Posted October 14, 2009 You would have to fetch the content based on the name. Like, you would have to pass the name to the URL and then check the DB based on the name. ok thought there was some other way thanks Quote Link to comment https://forums.phpfreaks.com/topic/177681-mod-rewrite-how-to-get-name-according-to-id/#findComment-937072 Share on other sites More sharing options...
dflow Posted October 20, 2009 Author Share Posted October 20, 2009 i need help with this mode rewrite in hebrew/non latin letters # Turn on the rewriting engine RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^טסט/([0-9A-Za-z]+)/?$ /test.php?id=$1 [NC,L] (because of the LTR paste it is awkward this is simsilar to: ##RewriteRule ^test/([0-9A-Za-z]+)/?$ /test.php?id=$1 [NC,L]) this works witha hebrew name for the test.php and with latin names as a parameter but when i put a hebrew letter/word as a parameter i get a 404 ?? Quote Link to comment https://forums.phpfreaks.com/topic/177681-mod-rewrite-how-to-get-name-according-to-id/#findComment-940358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.