Jump to content

mod_rewrite not affect to my link


catalankh

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.