1 (edited by 2013-06-07 18:19:53)

Topic: Problem with URL rewrite

CuteNews I have a folder /cms  --> /public_html/cms
I display the news /index.php --> /public_html/index.php instead /public_html/cms/example2.php

In URL Rewrite Manager
.htaccess path changed on: /public_html/.htaccess

File cn_friendly_url.php moved to /public_html/


I set in panel Cutenews --> URL Rewrite Manager

/news/view/%id  -->  /index.php?subaction=showfull

I deleted &title and I have something like this:
/news/view/1369409100?ucat=8&title=title_first_news

How to make it do so:
/news/view/1369409100

Re: Problem with URL rewrite

After the line

    $tpl = preg_replace('~\%\w+~', '0', $tpl);

in the file core/core.php add the line

    foreach ($adds as $id => $v) if (in_array($id, array('title'))) unset($adds[$id]);

You can instead of array('title') write array('ucat', 'title') to exclude ucat. This is a hack and it will be changed when the file core.php updates.

Best regards,
CN Support team

3 (edited by 2013-06-16 11:48:42)

Re: Problem with URL rewrite

After the line

    $tpl = preg_replace('~\%\w+~', '0', $tpl);

in the file core/core.php add the line

foreach ($adds as $id => $v) if (in_array($id, array('title'))) unset($adds[$id]);

You can instead of array('title') write array('ucat', 'title') to exclude ucat. This is a hack and it will be changed when the file core.php updates.

1. Files in /CuteNews moved to the root directory (/cn_friendly_url.php and .htaccess)

2. I changed the path in the main/options/Rewrite Manager

3. I changed the file core.php:

if (count($adds)) $tpl .= ''.implode(($html?'':''));

It is almost ok :-)



How to make the order for each category, for example, instead of /news/view was /gallery/view

News, category 8:
/news/view/&id -> opens the index.php

Gallery, category 9:
/gallery/view/&id -> opens to the gallery.php

Video, category 10:
/video/view/&id -> opens to the video.php



Category 8, News:

.htaccess path: /home/my_login/domains/my_domain/public_html/.htaccess

Read Full Story: /news/view/%id, /index.php?subaction=showfull

Archive ID: /news/archive/%archive, /index.php?subaction=list-archive

Comment: /news/view/%id/comments, /index.php?subaction=showcomments

News pagination: /news/view/%start_from, /index.php

Comment pagination: /news/view/%id/comments/%comm_start_from, /index.php?subaction=showcomments

Read Full Story archive: /news/view/%archive/%id, /index.php?subaction=showfull

Archive comment: /news/view/%archive/%id/comments, /index.php?subaction=showcomments

Archive comment pagination: /news/view/archiwe/%archive/%id/comments/%comm_start_from, /index.php?subaction=showcomments


Category 9, Gallery:

.htaccess path: /home/my_login/domains/my_domain/public_html/.htaccess

Read Full Story: /gallery/view/%id, /gallery.php?subaction=showfull

Archive ID: /gallery/archive/%archive, /gallery.php?subaction=list-archive

Comment: /gallery/view/%id/comments, /gallery.php?subaction=showcomments

News pagination: /gallery/view/%start_from, /gallery.php

Comment pagination: /gallery/view/%id/comments/%comm_start_from, /gallery.php?subaction=showcomments

Read Full Story archive: /gallery/view/%archive/%id, /gallery.php?subaction=showfull

Archive comment: /gallery/view/%archive/%id/comments, /gallery.php?subaction=showcomments

Archive comment pagination: /gallery/view/archiwe/%archive/%id/comments/%comm_start_from, /gallery.php?subaction=showcomments


Category 10, Video:

.htaccess path: /home/my_login/domains/my_domain/public_html/.htaccess

Read Full Story: /video/view/%id, /video.php?subaction=showfull

Archive ID: /video/archive/%archive, /video.php?subaction=list-archive

Comment: /video/view/%id/comments, /video.php?subaction=showcomments

News pagination: /video/view/%start_from, /video.php

Comment pagination: /video/view/%id/comments/%comm_start_from, /video.php?subaction=showcomments

Read Full Story archive: /video/view/%archive/%id, /video.php?subaction=showfull

Archive comment: /video/view/%archive/%id/comments, /video.php?subaction=showcomments

Archive comment pagination: /video/view/archiwe/%archive/%id/comments/%comm_start_from, /video.php?subaction=showcomments

Re: Problem with URL rewrite

Sometimes sites support scenarios where they support a web-site with both a leading “WWW” host-name prefix as well as just the host-name itself.  will this causes search engines to treat the URLs as different ??