You are here: Re: URL Rewriting « PHP Programming Language « IT news, forums, messages
Re: URL Rewriting

Posted by Philip Ronan on 10/27/73 11:33

"feed_sheep" wrote:

> I'm confused. I have set the following
>
> RewriteEngine on
> RewriteRule ^alumni/?$ index.php?content=alumni
>
> When I type www.site.com/alumni, it loads the index.php?content=alumni
> But when I type www.site.com/alumni/ it looks in the real folder on the site
> for an index.php (and doesn't find one). Plus, it sets all URLs in the page
> to be www.site.com/alumni/whatever.php
>
> What am I doing wrong?

I *may* be mistaken, and I often am when it comes to RewriteRules, but I
think what is happening is that your request for "alumni/" is being
implicitly converted into a request for "alumni/index.php" by a
DirectoryIndex rule somewhere else.

So perhaps if you change your rule to...

RewriteRule ^alumni(/.*)?$ index.php?content=alumni

....then you might have more luck.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация