Hi guys, maybe you can help me, it's the third day I am fighting with rewrite and it still wins I have a php ld directory and I am trying to make it seo friendly before annoucement. Now I am using rewrite by rewriter.php mod that takes pages name form DB and .htaccess looks like this: RewriteEngine on RewriteCond %{HTTP_HOST} ^juliawebdirectory\.com RewriteRule ^(.*)$ http://www.juliawebdirectory.com/$1 [R=permanent,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^Architecture(.*) index.php [R=301,L] it worked fine for several lines but there are 273 lines for categories and subcategories and after ~30th below folling pages start returning 404 error however the previous ones still work. If I delete [R=301,L] everything works fine but I would like to have exactly 301 redirect instead of 302 defalt. What am I doing wrong, how to fix the problem? And can somebody help me with code for making urls of category and subcategory pages to be like this http://www.juliawebdirectory.com/Arts/Architecture.php http://www.juliawebdirectory.com/Arts/Architecture2.php and so on instead of current http://www.juliawebdirectory.com/Arts/Architecture/ Thank you! Julia
just tried another option - deleted [R=301,L] from lines for main categories and it's worked out!!! all sucategories still has [R=301,L] and work OK. I wonder was it something like 'duplicate" redirect aplied to category and then its subcategory and that's why it didn't work? I think I will leave it for now but if somebody sees another solution please share it here. And how can I make URLs look more natural for example http://www.juliawebdirectory.com/Arts/Architecture/ rewritten to http://www.juliawebdirectory.com/Arts/Architecture.php ? remembering that the category and subcategory names are taken from the DB.
You want static .html or directory URLs. Why use mod_rewrite if you want .php URLs. That makes mod_rewrite worthless.