Support » Fixing WordPress » redirect rule not working

  • I’ve set this up in my .htaccess file:
    RewriteRule ^about/?(.*) /about.php [QSA]
    but for some reason it isn’t working. I copied this code from another rule that is working properly (RewriteRule ^reading/?(.*) /booklist.php [QSA]) so I don’t know what the problem is. If I remove this line from my htaccess file the about.php loads fine. With it in place I’m getting a 500 error. Could it be because the name is the same? I don’t know much about .htaccess stuff, so I have no idea. I also tried it with aboutme.php file but that didn’t work either.
    I know this isn’t directly related to wp, but could someone help me figure this out?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes, the about.php file is in the root directory. It too gives an error as long as I have the rule in my .htaccess file. If I remove it so there is no rule, the about.php file loads as it should. As soon as I add the rule to the .htaccess file, nothing works. Don’t know why that one isn’t working when all other rules are working.

    Did you try the new rewrite rule I suggested?
    Something similar works fine for me.

    Yes, I copied what you suggested and it didn’t make any difference. I’m just baffled.

    Okay, now, there should be exactly one newline at the end of the line before the new redirect rule. The right way to add a new rewrite rule would be to go to the end of the last rewrite rule, press enter, then type the new rewrite rule. That’s all I can figure.

    I went in, removed all the extra lines at the end of the file. Then at the end of the last rewrite rule, I hit enter and pasted the code you gave me. I’ll check with my host and see if he has any ideas why that one isn’t working.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘redirect rule not working’ is closed to new replies.