Forum Moderators: phranque
it doesn't work
The new URL should be an absolute URL beginning with a scheme and hostname. In Apache HTTP Server 2.2.6 and later, a URL-path beginning with a slash may also be used, in which case the scheme and hostname of the current server will be added.
Redirect 301 /path/ http://example.com/path/page/ if you are using mod_rewrite directives anywhere in your configuration
Is it possible to redirect /1/ to /1/2.phpmy immediate reaction is: Yes, but why would you want to? But maybe that's just what your fingers typed, and you're not really planning to redirect /short-url/ to /longer-url/with-extension.
my immediate reaction is: Yes, but why would you want to? But maybe that's just what your fingers typed, and you're not really planning to redirect /short-url/ to /longer-url/with-extension.
RedirectMatch 301 /location/ http://example.com/location/keyword/
..
example.com redirected you too many times.
RewriteRule ^location/?$ http://example.com/location/keyword/ [R=301,L]
See the $ sign? That's a closing anchor, meaning "this rule only applies if there's nothing else in the requested URL". The question mark is because search engines will ask for URLs without final slash, so you may as well redirect those at the same time.