Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-03-2008, 12:10 AM   #1
Registered: Jan 2004
Location: Hyderabad , India
Distribution: RHL 9
Posts: 42

Rep: Reputation: 15
URL rewrite rule not working...

Hello All,

We are trying to implement URL rewriting in our application. We are new to regular expressions+url rewriting.

We want the following URL

to be rewritten as

For this we have written following rewrite rules

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^/sandiego-hotel-deals/deal-(.*) /details.php?priority=$1&cat_id=$2&type=$3

We restarted Apache server(on linux) after creating .htaccess file. But there is no change ...still we are seeing the old url.

# We have created .htaccess file in folder.

Once the above works, we want to further extend the url rewriting to have 'deal title text' in the URL

For example for the link ... the deal title text is "Seven Hotel" .. we want the URL to be as follows...

.. is this possible? [Deal Title text comes from DB]

Kindly help us out. Thanks in advance!
Old 12-03-2008, 03:14 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
1. there is no "sandiego-hotel-deals" in the first URL so nothing will be found
2. is mod_rewrite installed and configured?


rewriterule, url

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache rewrite rule help - dynamic url to static page DukeLeto Linux - Software 3 11-12-2008 12:26 PM
rewrite rule base url apache2 sinister1 Linux - Software 3 11-23-2007 11:17 AM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 12:18 PM
i need a rewrite rule!help arcow Linux - Enterprise 1 07-03-2007 06:37 AM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 09:30 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration