I want to create a few redirects for my django app. So I've created a Static/CGI/PHP app just for redirecting. In it there's an .htaccess file with
This part works, but I also want to redirect www.mydomain.com/cat/some-category/some-long-slug ==> www.mydomain.com/category/name/some-long-slug` I've tried a couple of configurations like
or
also doesn't work. and neither does:
As you can see I'm a little lost with the 301 htaccess scripting, so any tips would be appreciated. Thank you! asked 06 Jun '13, 09:32 alphydan |
You can't use a redirect app between the same domain without redirect loops, redirect apps are best for sub-domain -> domain, or HTTP -> HTTPS, betweeen the same app you should put the last rule within a Location directive within httpd.conf. The last line is close to right, to pass URI you use $1, however without testing it in real-time its really hard to say. You should also be using curl to test, since browsers will cache 301s and make testing impossible.
answered 06 Jun '13, 17:04 johns thank you for the curl suggestion, and the separation of httpd.conf and .haccess to avoid loops. However, when I implement your suggestion and curl -I the
(07 Jun '13, 06:55)
alphydan
@alphydan - I think it will be much easier for us to help you with this if you open a support ticket, so that we can see the actual site and configuration files that you're working with.
(07 Jun '13, 19:06)
seanf
|