Mod-rewrite Trailing Slash Issue?

As @Paul Tomblin said, the . + is being greedy; that is, it's matching as much as it can (.+^/)/? $ tells it to match anything, followed by a character that isn't a /, then followed by an optional /.

This has the effect of not capturing the trailing The most probable reason your CSS and Javascript doesn't work is you're using a relative path, like src="my. Js". When there's a trailing slash, it looks like a directory, so your browser will look for /location/kings-lynn/my.js.

You can fix this simply by using an absolute path to your files (e.g. /location/my. Js).

As @Paul Tomblin said, the . + is being greedy; that is, it's matching as much as it can. ^(.+^/)/?

$ tells it to match anything, followed by a character that isn't a /, then followed by an optional /. This has the effect of not capturing the trailing /. The most probable reason your CSS and Javascript doesn't work is you're using a relative path, like src="my.

Js". When there's a trailing slash, it looks like a directory, so your browser will look for /location/kings-lynn/my.js. You can fix this simply by using an absolute path to your files (e.g. /location/my.

Js).

It looks like the (.+) is being greedy matched. In that case, you could try RewriteRule ^(.+^/)/? $ index.

Php? Franchise=$1 This makes sure that the first group (in the brackets) doesn't end in a slash.

Nice. This fixed my trailing slash problem (but not the lack of CSS issue). Don't suppose you could talk through how this works could you?

– Binarytales Nov 24 '08 at 17:43 The regular expression matches a group consisting of 1 or more of any characters, followed by any character other than a slash. Outside the group you're optionally matching a slash. Before my change, the slash might have ended up in the group.

– Paul Tomblin Nov 24 '08 at 17:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions