Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-17-2011, 02:49 PM   PM User | #1
Dragon Bird
New to the CF scene

 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Dragon Bird is an unknown quantity at this point
Question Mod_Rewrite, Not rewriting URLs and show No Error, working in reverse direction

My htaccess file is supposed to rewrite the URLs but it is not doing so, It recognize the re-written URL but do not convert a URL according to the rule.

here is the rules that I wrote in htaccess file and I think it is correct because it shows no error.


Code:
RewriteBase /
RewriteRule ^oriental-id-([0-9+])$ /index.php?page=article&id=$1 [L]
RewriteRule ^heap-([0-9]+)$ /index.php?page=category&id=$1 [L]
the parameter id may be any numeric.

It never show any Server Misconfigured error (Error 500) it means there is no error in the script.

When I go to the URL "http://mywebsite.com/index.php?page=category&id=11" I want the URL to be rewritten as "http://mywebsite.com/heap-11" but it doesnt rewrite it, it simply shows the "http://mywebsite.com/index.php?page=category&id=11".

Now when I go to the URL http://mywebsite.com/heap-11 it show the page located at http://mywebsite.com/index.php?page=category&id=11,

Clearly, it is recognizing the pattern but not actually rewriting the URL.
Any hint on the possible error ?
Dragon Bird is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:08 PM.


Advertisement
Log in to turn off these ads.