Usually i'm ok with htaccess, as long if it is not to difficult, but this one i can't seem to get done.
I have my old sef url's and i need to redirect them to my new sef urls, except of course the new sefurls that just need to be re-written.
Example:
my old sef urls are: assignment/client/projectname.html
and i want to change these in to: blog/assignment/client/projectname/
but, these should also work assignment/client/projectname or assignment/client/projectname.html and all should be redirected permantly to the new one. Then the new one's should be rewritten, see code below
- Code: Select all
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule \.(jpe?g|bmp|png|gif|JPE?G)$ cms/images/404image.png [L]
RewriteRule \.(css|jpe?g|gif|png|js|htc)$ - [L]
RewriteRule ^portfolio/(.*)$ index/$1 [N]
RewriteCond %{REQUEST_URI} !^(portfolio/|blog/|index/|contact/)(.*)$
RewriteRule ^(.*)$ blog/$1 [R=301]
RewriteRule ^(.*)/(.*)/(.*)/(.*)/$ $1.php?menu=$2&page=$3&id=$4 [L]
RewriteRule ^(.*)/(.*)/(.*)/(.*).html$ $1.php?menu=$2&page=$3&id=$4 [L]
RewriteRule ^(.*)/(.*)/(.*)/$ $1.php?menu=$2&page=$3 [L]
RewriteRule ^(.*)/(.*)/(.*).html$ $1.php?menu=$2&page=$3 [L]
RewriteRule ^(.*)/(.*)/$ $1.php?menu=$2 [L]
RewriteRule ^(.*)/(.*).html$ $1.php?menu=$2 [L]
RewriteRule ^(.*)/$ $1.php [L]
RewriteRule ^(.*).html$ $1.php [L]
I hope i can get across my problem.
If anybody has an idea? thanks a million!