LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 12-03-2008, 12:10 AM   #1
vikram_cvk
Member
 
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

http://www.seekseer.com/public_html/...id=1&type=Next

to be rewritten as

http://www.seekseer.com/public_html/...el-deals/deal1

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.

Note:
# We have created .htaccess file in http://www.seekseer.com/public_html/sai/hoteldeals/ 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 http://www.seekseer.com/public_html/...id=1&type=Next ... the deal title text is "Seven Hotel" .. we want the URL to be as follows...

http://www.seekseer.com/public_html/...evenHotel-Deal

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

Kindly help us out. Thanks in advance!
 
Old 12-03-2008, 03:14 AM   #2
j-ray
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?
 
  


Reply

Tags
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:36 PM.

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