Forum Moderators: phranque

Message Too Old, No Replies

.htaccess (revisited)

Looking for insight....

         

tonynoriega

4:17 pm on Aug 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First question is, how can i take these lines:
[2]
RewriteRule Builders/ index.php?action=page_display&PageID=12 [L]
RewriteRule Builders index.php?action=page_display&PageID=12 [L]
RewriteRule builders index.php?action=page_display&PageID=12 [L]
[/2]

and make it one line.... i havent figured that out...

Second question...say i have this line in my .htaccess file:


[2]
RewriteRule syringa/ index.php?action=page_display&PageID=12 [L]
[/2]

Then, i have s subdirectory page that i want direct access to via URI which is:
http://www.example.com/newsletters/syringaEblast/index.html

when i try to get to that direct URI, the RewriteRule kicks in and directs me to the rule.... why would that be?

<--!my .htaccess file below-->

# SEARCH ENINGE FRIENDLY URLS FOR OR 2.0
<IfModule mod_php4.c>
php_value session.use_trans_sid 0
</IfModule>

RewriteEngine On

Rewriterule ^index.html index.php
RewriteRule listing-([^-]*)-([0-9]*).html index.php?action=listingview&listingID=$2 [L]
RewriteRule page-([^-]*)-([0-9]*).html index.php?action=page_display&PageID=$2 [L]
RewriteRule search.html index.php?action=searchpage [L]
RewriteRule searchresults.html index.php?action=searchresults [L]
RewriteRule agents.html index.php?action=view_users [L]
RewriteRule view_favorites.html index.php?action=view_favorites [L]
RewriteRule calculator.html index.php?action=calculator&popup=yes [L]
RewriteRule saved_searches.html index.php?action=view_saved_searches [L]
RewriteRule listing_image_([0-9]*).html index.php?action=view_listing_image&image_id=$1 [L]
RewriteRule logout.html index.php?action=logout [L]
RewriteRule member_signup.html index.php?action=signup&type=member [L]
RewriteRule agent_signup.html index.php?action=signup&type=agent [L]
RewriteRule member_login.html index.php?action=member_login [L]
RewriteRule edit_profile_([0-9]*).html index.php?action=edit_profile&user_id=$1 [L]
RewriteRule Builders/ index.php?action=page_display&PageID=12 [L]
RewriteRule Builders index.php?action=page_display&PageID=12 [L]
RewriteRule builders index.php?action=page_display&PageID=12 [L]
RewriteRule builderupdate http://www.example.com/BuilderUpdate [L]

[edited by: encyclo at 10:21 am (utc) on Aug. 10, 2007]
[edit reason] switched to example.com [/edit]

phranque

7:06 pm on Aug 9, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



RewriteRule Builders/ index.php?action=page_display&PageID=12 [L]
RewriteRule Builders index.php?action=page_display&PageID=12 [L]
RewriteRule builders index.php?action=page_display&PageID=12 [L]

the regular expression that would match those three strings is:

[Bb]uilders/?