CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 httacces on ccs

Print topic Send  topic

Author Message
didi

Posts: 6
Posted: 11/28/2012, 7:20 PM

hi all, is it possible to create httaccces on ccs? help me please
View profile  Send private message
saseow

Posts: 744
Posted: 11/29/2012, 3:29 AM

It is just a text file so do it in notepad or something. CCS does not create them but naturally you can include it in your project.
View profile  Send private message
didi

Posts: 6
Posted: 12/01/2012, 10:19 PM

hi saseow thanks for your reply, i know its just text file but how to create statement like this on .httacces

RewriteRule ^categories-(.*)\.html$ media.php?module=Detail&id=$1 [L]

how to create parameter and id on ccs

"<li id='cat'><a href=categories-$k[id_categories]-$k[categories_seo].html title='Ada $k[jml] berita pada kategori $k[nama_kategori]'>

View profile  Send private message
saseow

Posts: 744
Posted: 12/02/2012, 12:10 AM

didi, I have never done this before and I don't see how you could do it as the data you are needing is all dynamic. I don't think it is possible to have an htaccess file changing all the time. I am just not sure.

Sorry,

Trevor
View profile  Send private message
bannedone


Posts: 273
Posted: 12/02/2012, 5:59 PM

Hi

This can be a rather thorny subject. I hope I can explain it properly for you

The .htaccess rewrite rules are basically regular expresions where you can replace strings in a URL with values of your choice.

Here is an example

RewriteRule ^(.*)page/(.*)/(.*)/$ $1yourpage.php?yourparam=$2 [L]

this part ^(.*)page/ specifies to find the string page/ (,*) will be placed in the $1 variable
this part (.*)/ Selects the second slash position as $2 variable
The next one like that Is Variable $3 (Not Used in this example).

The next piece after the 1st $ is what will be rewritten to the url.

So if your URL was http://whatever.com/page/1/any_text/ will be re-written to

Using $1 variable (all stuff before page/) and $2 variable(the value between the next slashes) it will become

http://whatever.com/yourpage.php?yourparam=1

So Using Your Rule

RewriteRule ^categories-(.*)\.html$ media.php?module=Detail&id=$1 [L]

with this URL

<a href='categories-$k[id_categories]-$k[categories_seo].html' title='Ada $k[jml] berita pada kategori $k[nama_kategori]'>

Will Probably not work.

First thing you need to realize is the when using mod_rewrite all URLs need to be fully qualified. By the I mean they must have http://the_doman_name in the href. This also iincludes any images or scripts or style sheets being included on the page.

What I have done to test re-write rules is insoect the apcahe error logs to try and determine how the re-write rule is modifying the URL

Hope this helps

BTW you can see an example of how I implemented .htaccess re-write rules in my Code Charge CMS implementing SEO Friendly URLs. http://demo.ccselite.com/ccsCMS5 . Your will see all URLs in this system are using mod-rewrite.

Have Fun
8-)


_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.