Jump to content

Mod_Rewrite help?


CheersnGears

Recommended Posts

Posted

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>

 

 

Posted

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

 

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...