Lifelesspeople.com

 Forum FAQsForum FAQs  Knowledge BaseKnowledge Base  RulesRules   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   HostingHosting   RegisterRegister 
 DonateDonate   WikiWiki   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't seem to get URL rewrite to work

 
Lifelesspeople.com Forum Index -> Web Architects' Abode
Post new topic   Reply to topic View previous topic :: View next topic  
Author Message
Pie32
Not Banned


Joined: 17 Mar 2005
Posts: 1411
Location: Lost in 84

PostPosted: Sun Feb 24, 2008 6:16 pm    Post subject: Can't seem to get URL rewrite to work Reply with quote

I'm having trouble getting mod_rewrite to work. Here's what I've got:
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/something/(.+)$ folder/something.php?d=$1

Except when I go to http://url.com/something/Text, I just get a white page (instead of the contents of http://url.com/something/something.php?d=Text). I can use .htaccess to redirect the page just fine, but I'd rather it do a rewrite.

EDIT-- The white page is my 404 page. I had forgotten that I set it to be a blank page.
_________________
[img]http://luneknight.com.ru/counter.jpg[/img]
Random Battle: [img]http://luneknight.com.ru/l.jpg[/img] vs. [img]http://luneknight.com.ru/r.jpg[/img]
Back to top
 
Pie32
Not Banned


Joined: 17 Mar 2005
Posts: 1411
Location: Lost in 84

PostPosted: Sun Feb 24, 2008 8:58 pm    Post subject: Reply with quote

Never mind, I got it to work. It seems that I shouldn't have had had that first slash. Silly me.
_________________
[img]http://luneknight.com.ru/counter.jpg[/img]
Random Battle: [img]http://luneknight.com.ru/l.jpg[/img] vs. [img]http://luneknight.com.ru/r.jpg[/img]
Back to top
 
krt
...


Joined: 11 Jan 2005
Posts: 4607
Location: Australia

PostPosted: Fri Mar 28, 2008 4:05 am    Post subject: Reply with quote

You can make things simpler in future with a base, it can be confusing at times figuring out whether you need a starting slash or not.

Simplest method is to add this line:
RewriteBase /
Back to top
 
Display posts from previous:   
Post new topic   Reply to topic    Lifelesspeople.com Forum Index -> Web Architects' Abode All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Home | Hosting | News | Forum | Links | System Status | About | Archive | Donate ]
Powered by phpBB © 2001, 2002 phpBB Group
All trademarks and copyrights on this page are owned by their respective owners. Posts and comments are owned by the poster. Everything else © 2001 - 2007 Lifelesspeople.com