Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted August 23, 20168 yr Hello, I just upgraded to 4.1 from 3.4. The URLs for my articles appear to be broken. My old url structure was site_url/_/article_category/article_title My new url structure is site_url/articles/article_category/article_title I have already put in a ticket, but IPS has determined that helping me with this is outside of their scope of support. I've added this line to my .htaccess, but it doesn't seem to be helping. RewriteRule ^_/$ /articles/? [L,R=301] Here is the full text of my Mod_Rewrite <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^page/index.html/(.*)$ https://www.cheersandgears.com/$1 [R=301,L] RewriteBase / RewriteRule ^_/$ /articles/? [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico)(\?|$) - [L,NC,R=404] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] RewriteCond %{HTTP_HOST} ^cheersandgears\.autohosts\.net$ [OR] RewriteCond %{HTTP_HOST} ^www\.cheersandgears\.autohosts\.net$ RewriteRule ^/?$ "http\:\/\/192\.157\.233\.68\/" [R=301,L] </IfModule>
August 23, 20168 yr Try this rewriterule ^_/article_category/article_title (.*)$ https://www.cheersandgears.com/articles/article_category/article_title $1 [r=301,nc]
August 23, 20168 yr Author thanks, I had to modify what you put because you left the placeholders in, but I got the idea of what you were trying to say and it didn't work.
August 23, 20168 yr try redirect //301 Redirect Entire Directory RedirectMatch 301 https://www.cheersandgears.com/_/article_category/article_title (.*) https://www.cheersandgears.com/articles/article_category/article_title /$1
August 23, 20168 yr Author This ended up being the answer RewriteRule ^_/(.*)$ http://www.cheersandgears.com/articles/$1 [R=301,L]
August 25, 20168 yr Are articles the only database that ever saw the light of live? If so, the above is fine. if not... you might want to add the following as an additional processing rule after that one. RewriteRule ^(.*)/_/(.*)$ http://www.cheersandgears.com/$1/$2 [R=301,L] So that other database records properly redirect.
Archived
This topic is now archived and is closed to further replies.