Need .htaccess Rewrite Explained

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Need .htaccess Rewrite Explained

Post by Skara »

Apache 2.0.49
Complete .htaccess newb.

I can't get it to do anything but give me a 404.

I want to rewrite
webdesign.jumpfrog.org/example
or
webdesign.jumpfrog.org/example/something
into
webdesign.jumpfrog.org/?page=example

I'll add more to it once I get this working.
My problem is, I can't find any good tutorials on it.
Here's what I've got:

Code: Select all

RewriteEngine On
RewriteCond %{HOST_NAME} ^webdesign.jumpfrog.org$
RewriteRule ^(ї^/]+) ?page=$1 їL]
Also, which directory do I put it in? The webdesign directory or the jumpfrog directory? (I've tried both to no avail.)
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

Ok, found out .htaccess is a mini httpd.conf. Right. Tried putting the rewrite stuff in there too. Restarted apache. No difference. Changed the above to simply:

Code: Select all

RewriteEngine On
RewriteRule ^(.+) ?page=$1 їL]
and still nothing. -_-'

(btw, I realized I made a mistake in the RewriteCond with the .s)

I've read and read the manual on this. Surely it's something stupid I'm doing, but I sure as hell can't figure it out.
Post Reply