Topic: URL REWRITER
IS IT JUST ME WHO THINKS NOBODY SEEMS TO BE RESPONDING TO PEOPLE CRYING OUT HOW TO USE THE URL REWRITER?
Does anyone know how to use it or have a walkthrough seeing as the admin and moderators keep ignoring my messages
Dear CuteNews Users! Please feel free to contact us via our new Feedback Form and please send information about bugs to our bug tracker.
You are not logged in. Please login or register.
CutePHP Forums → Problem Solving / Help & Support → URL REWRITER
IS IT JUST ME WHO THINKS NOBODY SEEMS TO BE RESPONDING TO PEOPLE CRYING OUT HOW TO USE THE URL REWRITER?
Does anyone know how to use it or have a walkthrough seeing as the admin and moderators keep ignoring my messages
There are possible ways in Rewrite Manager on the left side, and on the right side there are their aliases, i.e. those query that are created from the left template.
May i know where can i find the URL rewriter manager? I can't find it at the Option page. I am using CuteNews 1.5.3. Thanks
In github version URL Rewrite Manager is transferred to the plugin that can be downloaded here https://cutephp.com/download.php?q=L3BsdWdp...mV3cml0ZS56aXA=
Thanks.
I managed to install the plug-in but when I use it, my the news URL are directed to a 404 error. Why is this so?
The same...
1. .htaccess is absent'
2. mod_rewrite doesn't work;
3. incorrect module settings.
Hello,
.htaccess file is present. It is located at my root directory and I directed the .htaccess path in the Rewrite Manager to the root directory path.
As for 2 and 3, could you kindly explain more on it? Where exactly do I find this "mod_rewrite". Also, what is the correct module setting then? (In fact, what is module setting)
Thanks
Extra information,
Taking [Read Full Story] as an example
Template Value - /news/view/%id/%title
Use Layout (your *.php) - /showmore?subaction=showfull
Original URL is this,
http://my-site.com/showmore.php?subaction=...1374841674&
URL Rewrites to this,
http://my-site.com/cms/news/view/1374841674/5
The rewrites URL direct me to a 404 error page. Additionally, if you look at the rewrites URL, there is a /cms/. This is my folder name for my CuteNews and I doesn't want people to know.
This is the .htaccess generated by the Rewrite Manager,
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cdata/plugins/rewrite/cn_friendly_url.php?rew=$1&%{QUERY_STRING}[L]
Here Use Layout (your *.php) - /showmore?subaction=showfull
Correct showmore --> showmore.php
Here Use Layout (your *.php) - /showmore?subaction=showfull
Correct showmore --> showmore.php
Hello, thanks for the fast reply.
I corrected this showmore.php after I posted the extra information and it still doesn't work.
I would like to ask, is it necessary to have /news/view/ inside the template value?
Sorry for posting again. New information, after changing the showmore to showmore.php, the page now load a 500 Internal error page instead of 404 error page.
Hello, thanks for the fast reply.
I corrected this showmore.php after I posted the extra information and it still doesn't work.
.htaccess file is in the same folder as the file cn_friendly_url.php? please, show your .htaccess file
Hello,
I changed the .htaccess path back to /public_html/cms/cdata/plugins/rewrite.
The .htaccess file in the folder generated this,
Order Deny,Allow
Deny From All
<Files ~ "cn_friendly_url\.php$">
Order Deny,Allow
allow from all
</Files>
Please take note that this .htaccess file permission is set as 0644.
Edit: Upon changing to this, the page now load back error 404 again.
Hello,
I changed the .htaccess path back to /public_html/cms/cdata/plugins/rewrite.
The .htaccess file in the folder generated this,
Order Deny,Allow
Deny From All
<Files ~ "cn_friendly_url\.php$">
Order Deny,Allow
allow from all
</Files>Please take note that this .htaccess file permission is set as 0644.
Edit: Upon changing to this, the page now load back error 404 again.
.htaccess should look like
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cms/cn_friendly_url.php?rew=$1&%{QUERY_STRING}[L]
Hi,
If the .htaccess look like the one you wrote, this means the cn_friendly_url.php and .htaccess has to be in the cms main folder. (Please correct me if I am wrong).
Hence, I moved cn_friendly_url.php and .htaccess to /cms folder from /cdata/plugins/rewrite folder and rewrote the .htaccess to,
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cms/cn_friendly_url.php?rew=$1&%{QUERY_STRING}[L]
Unfortunately, the page still load out an error 404.
Hi,
If the .htaccess look like the one you wrote, this means the cn_friendly_url.php and .htaccess has to be in the cms main folder. (Please correct me if I am wrong).
Hence, I moved cn_friendly_url.php and .htaccess to /cms folder from /cdata/plugins/rewrite folder and rewrote the .htaccess to,
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cms/cn_friendly_url.php?rew=$1&%{QUERY_STRING}[L]Unfortunately, the page still load out an error 404.
Try to move the .htaccess file (above), at root folder.
Hi,
First thanks alot for the constant and quick reply, I appreciate it.
I have moved cn_friendly_url.php and .htaccess to my root directory.
The page now show and load,
"cant find the conf_rw.php file"
instead of a 404 error page.
This is my current .htaccess
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /home3/name/public_html/cn_friendly_url.php?rew=$1&%{QUERY_STRING}[L]
Put the following in the file ./Ñdata/plugins/rewrite/conf_rw.php (there is a plug-in installation file)
<?php
$conf_rw_htaccess = " /home3/name/public_html/.htaccess"; // <--- edit this
$conf_rw_readmore = "/news/view/%id/%title";
$conf_rw_readmore_layout = "/example2.php?subaction=showfull";
$conf_rw_archread = "/news/archive/%archive";
$conf_rw_archread_layout = "/example2.php?subaction=list-archive";
$conf_rw_readcomm = "/news/read/%id/%title/comment";
$conf_rw_readcomm_layout = "/example2.php?subaction=showcomments";
$conf_rw_newspage = "/news/read/%start_from";
$conf_rw_newspage_layout = "/example2.php";
$conf_rw_commpage = "/news/read/%id/%title/comment/%comm_start_from";
$conf_rw_commpage_layout = "/example2.php?subaction=showcomments";
$conf_rw_archreadmore = "/news/archive/%archive/%id/%title";
$conf_rw_archreadmore_layout = "/example2.php?subaction=showfull";
$conf_rw_archreadcomm = "/news/archive/%archive/%id/%title/comment";
$conf_rw_archreadcomm_layout = "/example2.php?subaction=showcomments";
$conf_rw_archpage = "/news/archive/%archive/%start_from";
$conf_rw_archpage_layout = "/example2.php?subaction=list-archive";
$conf_rw_archcommpage = "/news/archive/%archive/%id/%title/comment/%comm_start_from";
$conf_rw_archcommpage_layout = "/example2.php?subaction=showcomments";
Hi there,
I have changed the conf_rw.php that is still located inside my /Ñdata/plugins/rewrite/ folder.
The $conf_rw_htaccess has been changed to where my .htaccess is located at. However, the "cant find the conf_rw.php file" still remains when I load the page.
Take note that inside the Rewrite Manager, ".htaccess path" has already been changed to /home3/name/public_html/.htaccess.
Here's the problem with the correct location of files:
1) .htaccess should be in the root, to handle all requests;
2) cn_frienly_url.php must be located at the same folder as the show_news.php, and others because of /home3/name/public_html/cn_friendly_url.php script can not reach the file /home3/name/public_html/cdata/plugins/rewrite / conf_rw.php
Hello,
Thanks. As you instructed, my current .htaccess is at the root directory and my cn_friendly_url.php is at the same folder as my show_news.php in /cms folder.
However, I am getting this error when I load a page,
Warning: include(/home3/name/public_html/cms/layouttest1.php) [function.include]: failed to open stream: No such file or directory in /home3/name/public_html/cms/cn_friendly_url.php on line 66
Warning: include() [function.include]: Failed opening '/home3/name/public_html/cms/layouttest1.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home3/name/public_html/cms/cn_friendly_url.php on line 66
Note that my /layouttest1.php is where my news are displayed at and it is located at my root directory.
My current .htaccess is this,
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cms/cn_friendly_url.php?rew=$1&%{QUERY_STRING}[L]
File layouttest1.php is must be located at the directory ./cms. Move layouttest1.php in cms folder or make a cms/layouttest1.php with code:
<?php include '/home3/name/public_html/layouttest1.php';
Hi,
I have moved the file layouttest1.php to the same folder.
When I click on [Read More], the URL simply changed to this
http://my-site.com/cms/news/view/137484167...ttest1.php&[L]=
instead of this,
http://my-site.com/cms/news/view/1374841674/5
Furthermore, the loaded page (http://my-site.com/cms/news/view/1374841674/5?rew=layouttest1.php&[L]=) is exactly the same as my index page (meaning the page didn't change at all except for the URL).
CutePHP Forums → Problem Solving / Help & Support → URL REWRITER
Powered by PunBB, supported by Informer Technologies, Inc.
The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.