httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eben Goodman <e...@bakedbean.net>
Subject Re: [users@httpd] mod_rewrite syntax question
Date Tue, 18 Nov 2003 02:47:14 GMT
thanks for the reply,

so I tried this and it didn't work, is there another way to use the R flag?

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/index\.php.*
RewriteRule ^(.+) - [L]
RewriteRule ^(.+)/$ index.php?request=$1 [T=application/x-httpd-php,R,L]

thanks for your time,

Eben



Joshua Slive wrote:

>On Mon, 17 Nov 2003, Eben Goodman wrote:
>  
>
>>the problem is that I can't use a url like www.domain.com/value/value -
>>without the trailing slash I get a 404 error.  If I take the 6th line:
>>RewriteRule ^(.+)/?$ index.php?request=$1 [T=application/x-httpd-php,L]
>>and remove the question mark like so:
>>RewriteRule ^(.+)/$ index.php?request=$1 [T=application/x-httpd-php,L]
>>
>>I can use urls without trailing slashes, but then my style sheets and
>>images don't resolve.  I'm still a bit of a novice with the mod_rewrite
>>regex syntax, and am a bit baffled by this.  Any advice is appreciated.
>>    
>>
>
>I don't precisely understand the details of your problem, but it appears
>the basics are: you want to be able to use a URL without a trailing slash,
>but you need the trailing slash to make relative references work.
>
>The standard solution to this is to do an external redirect ([R] flag to
>rewriterule) to send the client from the bad url to the good url.
>
>Joshua.
>
>---------------------------------------------------------------------
>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