Simple(?) htaccess rewriting issues?

Firstly in order to force the backslash on the end you will need to actually do a redirect RewriteRule ^article/(a-zA-Z0-9_-+)/(a-zA-Z0-9_-+)$ /article/$1/$2/ R=302,L RewriteRule ^section/(a-zA-Z0-9_-+)$ /section/$1/ R=302,L Note: I use 302 because 301 can be a pain during testing, once everything is working and you are happy with it change it to 301 The two remaining rules are the rewrites that simply mask/alias the query_string URL, which should look something like this RewriteRule ^article/(a-zA-Z0-9_-+)/(a-zA-Z0-9_-+)/$ /result. Php? Section=$1&url=$2 RewriteRule ^section/(a-zA-Z0-9_-+)/$ /section.

Php? Section=$1.

Firstly in order to force the backslash on the end you will need to actually do a redirect... RewriteRule ^article/(a-zA-Z0-9_-+)/(a-zA-Z0-9_-+)$ /article/$1/$2/ R=302,L RewriteRule ^section/(a-zA-Z0-9_-+)$ /section/$1/ R=302,L Note: I use 302 because 301 can be a pain during testing, once everything is working and you are happy with it change it to 301. The two remaining rules are the rewrites that simply mask/alias the query_string URL, which should look something like this... RewriteRule ^article/(a-zA-Z0-9_-+)/(a-zA-Z0-9_-+)/$ /result. Php?

Section=$1&url=$2 RewriteRule ^section/(a-zA-Z0-9_-+)/$ /section. Php? Section=$1.

Cags - thank you so much for your help! The trailing slash problem is solved, but strangely the section rule doesn't work on the live server (fine on my local machine). Is there anything there that looks wrong in there, or could be tidied up?

– james Jul 29 '10 at 20:31 My only real advice is to check the URLs the article rule redirects to a results. Php page in your root directory and the section rule redirects to a section. Php in the root directory.

When you say it doesn't work what do you get? A 404 error? If so try adding a R=302 flag to the end of the rule, the URL in your address bar should change and hopefully the error will be obvious.

– Cags Jul 29 '10 at 20:38 thank you for the tip, that was very useful! So now I see that on the live server the redirect doesn't work at all. On my machine, /section/art/ redirects to /section.

Php? Section=art, whereas the link on the live server just goes to /section/art/ with no redirect. Is there anything else I could try here?

– james Jul 29 '10 at 20:49 Do you have a different browser on your computer to test it with? I've had a lot of problems with cached information in the past. Failing that try hit ctrl+f5.

– Cags Jul 29 '10 at 20:57 yeah i've been using ff/chrome/ie etc, always the same issue sadly. I'm thinking there must be something wrong with the rule itself? – james Jul 29 '10 at 20:58.

Firstly in order to force the backslash on the end you will need to actually do a redirect...

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