CheersnGears Posted August 23, 2016 Posted August 23, 2016 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>
Adlago Posted August 23, 2016 Posted August 23, 2016 Try this rewriterule ^_/article_category/article_title (.*)$ https://www.cheersandgears.com/articles/article_category/article_title $1 [r=301,nc]
CheersnGears Posted August 23, 2016 Author Posted August 23, 2016 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.
Adlago Posted August 23, 2016 Posted August 23, 2016 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
CheersnGears Posted August 23, 2016 Author Posted August 23, 2016 This ended up being the answer RewriteRule ^_/(.*)$ http://www.cheersandgears.com/articles/$1 [R=301,L]
Marcher Technologies Posted August 25, 2016 Posted August 25, 2016 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.
CheersnGears Posted August 25, 2016 Author Posted August 25, 2016 Yes, the only database I had live was the articles one.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.