Re: [users@httpd] help with rewrite rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That's why I was saying you'd probably have to write something a little complicated.

Its really hard if you don't already have a naming convention in mind.
That way you could just force it to rewrite without the ending slash if you wanted. I think its adding the trailing slash because it assumes cota is a directory.
(Someone else on here might have a better explanation.)

What exactly are you trying to see happen, in human terms, i.e. how would
you like the request to unfold.


Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 19, 2006, at 2:09 PM, Mike Soultanian wrote:

Hey Pid,
I gave this a try:

RewriteRule /(.*)(/)?$ http://localhost:81/$1$2 [P]

and it's still converting:

http://cfdev.cota.csulb.edu/cota

to

http://localhost:81/cota/

instead of:

http://cfdev.cota.csulb.edu/cota/

Any ideas?

thanks,
Mike

Pid wrote:
RewriteRule /(.*)(/)?$ http://localhost:81/$1$2
you need the second dollar variable to pick up the second pair of
brackets, instead of always appending a slash.
Mike Soultanian wrote:
Boysenberry Payne wrote:
How about adding this:

RewriteRule /(.*)(/)?$ http://localhost:81/$1/ [P]

That almost worked!

That's interesting because it gets me through to the page, but still
leaves off the trailing slash. That in turn breaks the relative links which are looking for the trailing slash as can be seen here (I just set
up a dns entry for my server):

http://cfdev.cota.csulb.edu/cota

whereas if you put the trailing slash, the trailing slash is getting
appended to everything and seems to break other things on the site such
as images.  When trying to view:

http://cfdev.cota.csulb.edu/cota/layouts/images/about/about- banner.jpg

I'll get the following error:

The requested URL /cota/layouts/images/about/about-banner.jpg/ was not
found on this server.

Any ideas?

Thanks!
MIke

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux