httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel-St├ęphane SMORGRAV <Axel-Stephane.SMORG...@europe.adp.com>
Subject RE: [users@httpd] Mod-Rewrite within a Mod-Rewrite
Date Tue, 09 May 2006 09:21:41 GMT
What do you expect Reference/Glossary should be rewritten to ? 

 As far as I can tell from your rewrite rules, Reference/Glossary and Reference/Glossary/
should be rewritten into Reference/index.php?ref=Glossary. If that is not the case, you should
turn on the rewrite logs at a log level of at least 3. That will enable you to determine why
the rewriting is not happening according to your expectations.

If that is not what you expect, then you should tell us what you expect.

Otherwise I would definitely replace [a-zA-Z0-9()_/-] with [^/] (which matches anything but
/), or at least remove the / as in [a-zA-Z0-9()_-].

-ascs

________________________________

From: David Blomstrom [mailto:david_blomstrom@yahoo.com] 
Sent: Monday, May 08, 2006 2:16 AM
To: users@httpd.apache.org
Subject: [users@httpd] Mod-Rewrite within a Mod-Rewrite


This is the rewrite rule for my Reference section, which works:


RewriteRule ^Reference/([a-zA-Z0-9()_/-]+)/?$ Reference/index.php?ref=$1 [L] 


I'd like to also create a similar Glossary section, like this:


RewriteRule ^Glossary/([a-zA-Z0-9()_/-]+)/?$ Glossary/index.php?glos=$1 [L] 


Except I'd like the URL to be MySite/Reference/Glossary. In other words, the Glossary folder
will be inside the Reference folder. So I created a new page at Reference/Glossary/index.php,
then changed my mod-rewrite rules, as follows:


RewriteRule ^Reference/Glossary/([a-zA-Z0-9()_/-]+)/?$ Reference/Glossary/index.php?glos=$1
[L] 

RewriteRule ^Reference/([a-zA-Z0-9()_/-]+)/?$ Reference/index.php?ref=$1 [L] 


It now correctly displays URL's with text appended to Reference/Glossary, like MySite/Reference/Glossary/politics.
However, I can no longer view the Glossary home page. If I type in MySite/Reference/Glossary,
it defaults to http://ivr/Reference/Glossary/?ref=Glossary, and I get a custom Page Not Found
error, where I used to get a real page. How can I fix this?

Thanks. 

________________________________

Yahoo! Mail goes everywhere you do. Get it on your phone <http://us.rd.yahoo.com/evt=31132/*http://mobile.yahoo.com/services?promote=mail>
.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message