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 01-25-2013, 02:12 PM   PM User | #1
tomharto
Regular Coder

 
Join Date: Jul 2010
Location: Sheffield
Posts: 807
Thanks: 92
Thanked 18 Times in 18 Posts
tomharto is on a distinguished road
Whats wrong with this rewriterule?

Heres my .htaccess file

Code:
RewriteEngine On
RewriteRule ^faq/([a-Z]+)/([0-9]+)$   faq.php?Title=$1&ID=$2
RewriteRule ^/?([a-z]+)$ $1.php [L]
The second line on its own works fine but I cant get the first one to.

I want it so if the url is faq/Hello/1 the page loads faq.php?Title=Hello&ID=1

What have i missed/done wrong?
tomharto is offline   Reply With Quote
Old 01-26-2013, 11:02 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Try
Code:
RewriteRule ^faq/([a-Z]+)/([0-9]+)$   faq.php?Title=$1&ID=$2  [L]
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft 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:35 AM.


Advertisement
Log in to turn off these ads.