Forum Moderators: phranque

Message Too Old, No Replies

Creating Redirect rule for directory, without redirecting lower pages?

         

passionfruit

11:12 am on Oct 11, 2010 (gmt 0)

10+ Year Member



Hi everyone,

suppose we have the URL format:

domain.com/directory/page.html

in such a case, how can we redirect ONLY the page that appears at domain.com/directory WITHOUT redirecting page.html and all the rest of the pages contained in the directory?

sublime1

3:05 am on Oct 12, 2010 (gmt 0)

10+ Year Member



Hi --

The forum charter (linked at the top) requests that you give us a little more to go on.

What have you tried? What context are you talking about? How can you tell that the URL is a directory? Do all pages end with .html? Do all directories end with a /? Or can you map a URL to an actual filesystem directory?

Most likely, you'll need a regular expression that you can use in a RewriteRule.

Hopefully that gets you a start, and further questions with a bit more detail are generally answered pretty fast around here.

Tom