On Wednesday 06 September 2006 2:37 pm, Aaron J. Seigo wrote:
> On Wednesday 06 September 2006 10:53, Nick Wiltshire wrote:
> > So, on my laptop I have:
>
> you know you can have virtualhosts on your laptop too right? just throw an
> name in /etc/hosts on the localhost line and use that name in your apache
> config. prevents having to mess with the rewrite rules at all. anyways....
>
> > RewriteRule ^/test/website/(.*) /test/website/index.php?var=$1
>
> this works perfectly here.
>

I got it to almost work, by putting it in a vhost context. However now I 
get ?var=/index.php on the end. Baby steps.

> > RewriteRule /test/website/(.*) /test/website/index.php?var=$1
>
> as does this, though you do want the ^ so you don't get something odd in
> case of /foo/text/website
>
> > I get an internal server error
>
> can you please be verbose? you say you get an error .. well.. which one?!
> the fewer details you provide the more likely it is no one will be able to
> help you effectively.
>

That was actually the extent of the error. 500: internal server error. Your 
Apache config passed the testing phase but it's pooched, so fix it. Of course 
it puts it a bit more technical than that.

> > Oh, another thing that might matter is I am putting these rules in the
> > <Directory /> context.
>
> rewrite rules work rather differently in Directory and .htaccess contexts
> than they do in the main server config. i really recommend reading
> the "Per-directory rewrites" section on this page:
>
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

Thanks, will do. I'm happy to have made a bit of progress for today.

This is helpful while learning:
http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/

Nick

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to