Loading...
 
Skip to main content

Architecture / Installation


Re: 301 Redirect with trailing slash not working

posts: 215

In the Redirect I use, the syntax requires the target URL to be fully qualified, so your "working" example would not work for me. Or are you assuming we realize you truncated the URL in your "working" example?

You can partially fix your problem using RedirectMatch instead of Redirect.

Copy to clipboard
RedirectMatch /simplyspoiled/? http://domain.com/tiki-index.php?page=Simply+Spoiled

works with the ending slash. The question mark after the last slash means one or none of the preceding character, so it will redirect for both /simplyspoiled and /simplyspoiled/.

Or use:

Copy to clipboard
RedirectMatch /simplyspoiled(/index.php|/?) http://domain.com/tiki-index.php?page=Simply+Spoiled

to match /simplyspoiled, /simplyspoiled/, and /simplyspoiled/index.php.

I do not know how you can get a SEF target URL to work with the redirect using this method though.

There are no comments at this time.