LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-21-2004, 04:17 PM   #1
digitalgravy
Member
 
Registered: Nov 2003
Posts: 86

Rep: Reputation: 15
Apache mod_rewrite not functioning as expected


I have installed pastebin http://pastebin.com/ on one of my sites.

In the documentation it says for short url generation add a rewrite rule like the following

Code:
RewriteEngine on
RewriteRule /([0-9]+) /pastebin.php?show=$1
Basically instead of having this for a url

somesite.com/pastebin.php?show=55

you would have

somesite.com/55
So I setup the .htaccess file with the rewrite rule from above.

When I go to pastebin.somesite.com/55 it gives me a 404 not found but if I go to pastebin.somesite.com/pastebin.php?show=55 it shows the page.

For some reason the rewrite rule works just not at the site root.

If you go to
pastebin.somesite.com/non-existent-directory/1
it works, but if you go to
pastebin.somesite.com/1
it spits out the 404 error


The Rewrite rule works. Just not for the root level of the site.
I want it to work at the root level also.

Do any of you have any suggestions for the rule, or maybe why it doesnt work?

Thanks in advance for any help you can provide.
 
  


Reply



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
enable mod_rewrite in apache 1.3.9 robertngo Linux - Software 4 07-18-2005 03:02 AM
Apache: no mod_rewrite module? psychobyte Linux - Networking 1 05-07-2005 12:43 AM
Apache Mod_rewrite help! soulsniper Linux - Software 0 01-16-2005 05:23 PM
Apache:mod_rewrite MadMikie Linux - Software 0 08-03-2004 07:33 AM
Apache and mod_rewrite notsoevil Linux - General 0 01-23-2002 01:39 PM

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

All times are GMT -5. The time now is 06:28 AM.

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