Topic: URL Rewrite

Hi all,

So, I've gotten the rewrite working in the lastest version of CuteNews.. but is there a way to make it not make my full story pages .html (and make them .php instead)? And then to write the links when I list headlines without the .php in the link?
I already have edited my .htaccess file so that a link written without an extension will work properly. But I don't know how to get CuteNews to go along with this..

Sorry if this seems like a silly question. I feel like the answer should be really obvious but I'm having a complete mind blank...

Re: URL Rewrite

Which version of CuteNews you using? CuteNews 2 has a URL rewrite that is working at the moment.

Re: URL Rewrite

The latest one, which is 2. But it automatically makes them .html pages and I'm just wondering how I can get it to change that.. https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: URL Rewrite

Is it possible to do this? I'm still not sure which files I'm supposed to be looking into for getting a .php out of it but not having .php at the end of the link to the article it generates.. https://cutephp.com/forum/style_emoticons/default/sad.gif

Re: URL Rewrite

Hi all,

So, I've gotten the rewrite working in the lastest version of CuteNews.. but is there a way to make it not make my full story pages .html (and make them .php instead)? And then to write the links when I list headlines without the .php in the link?
I already have edited my .htaccess file so that a link written without an extension will work properly. But I don't know how to get CuteNews to go along with this..

Sorry if this seems like a silly question. I feel like the answer should be really obvious but I'm having a complete mind blank...

Could you kindly give us some examples of the links you want to get and how and where you want them to generate, the more details the better. It would also be great if you could send us your modified .htaccess file for our better understanding of the problem.

Best regards,
CN Support team

Re: URL Rewrite

Could you kindly give us some examples of the links you want to get and how and where you want them to generate, the more details the better. It would also be great if you could send us your modified .htaccess file for our better understanding of the problem.

Thanks for your response. https://cutephp.com/forum/style_emoticons/default/smile.gif

I've got it working, but I just want to configure it further.

What I currently get as the URL to a post is /news/{title}.html, which is what I want.. mostly.

However, I don't want the pages it generates for the news items to be .html, I would rather them be .php.
Also, I also want it to be able to function with the following (from my .htaccess file):

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
  # Options +SymLinksIfOwnerMatch
    RewriteEngine On
  # RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php
</IfModule>

As you can see from the snippet above, I've been linking to pages without using .php in the link and I would like to be able to do the same with my news. Although the first hurdle will be making sure the pages are .php in the first place.

Re: URL Rewrite

Heya,

I am also hoping to know how to change the .html to .php instead. Thanks https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: URL Rewrite

I just noticed that even the pages you go through with pagination are .html. Is there a way to change those to .php (and same as above) as well?

Re: URL Rewrite

Hi shianra, did you manage to write out a URL rewrite to remove the php and HTML? Care to share?

Re: URL Rewrite

The latest update to the URL rewrite in CuteNews has an option to remove the .HTML. Cheers!