my mod_rewrite is not affect to my link why?
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} news/
RewriteCond %{REQUEST_URI} tips/
RewriteCond %{REQUEST_URI} views/
RewriteRule news/ menu.php?ph_sc_menu_id=1 [L]
RewriteRule tips/ menu.php?ph_sc_menu_id=2 [L]
RewriteRule views/ menu.php?ph_sc_menu_id=3 [L]
if i key on my url box it working but when i click my navigation menu it still display menu.php?ph_sc_menu_id=3
6 replies to this topic
#1
Posted 08 January 2013 - 03:12 PM
#2
Posted 08 January 2013 - 03:19 PM
That's not how you should be using mod_rewrite. You can't define every link and every possible bit of GET data, that's just crazy. Go an have a read on what it should be used for and then how to use it.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
"One of my most productive days was throwing away 1000 lines of code."
"One of my most productive days was throwing away 1000 lines of code."
#3
Posted 09 January 2013 - 12:45 PM
though to i write like that it not worke too
RewriteEngine On
RewriteRule ^menu/([0-9]+) menu.php?ph_sc_menu_id=$1
what's going on?
RewriteEngine On
RewriteRule ^menu/([0-9]+) menu.php?ph_sc_menu_id=$1
what's going on?
#4
Posted 09 January 2013 - 02:06 PM
I have no idea what the hell that post is meant to mean...
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
"One of my most productive days was throwing away 1000 lines of code."
"One of my most productive days was throwing away 1000 lines of code."
#5
Posted 10 January 2013 - 12:06 AM
mod_rewrite rewrites requests. In other words, when people use a browser and type in a url, mod_rewrite can be used to modify that to something different inside Apache.
It does not *change the html your script sends back*. If you want your urls to be displayed in a particular format, you must render them in that format.
It does not *change the html your script sends back*. If you want your urls to be displayed in a particular format, you must render them in that format.
Follow me | My homepage | L.A. LAMP special interest group | LA PHP Developers Group | Movie Review Site | Video news for kids | Have you read the TOS?
#6
Posted 20 January 2013 - 01:04 AM
cpd what the fucking going on with you why you always reply with hell worthless answer if you don't know or understand my question keep silent no one said you're blind or dump dam stupid
#7
Posted 20 January 2013 - 05:50 AM
I don't always give bad, incomplete or pointless answer. My first post made a point, explained why and told you where to go and correct it (through google) because explaining every little details is silly on here when its been done a million other times by other people. My second post clearly indicates you're posts don't make sense which may be why you have little responses. Gizmola hasn't directly answered your question but instead gone on a tangent explaining in brief what mod_rewrite is for; this is what I told you to lookup in my first post.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
"One of my most productive days was throwing away 1000 lines of code."
"One of my most productive days was throwing away 1000 lines of code."
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




This topic is locked







