HELP!!! mod rewrite to allow static. html files NEEDED

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

does any one have a .htaccess  file to allow CMSMS to allow  mod rewrite to allow static. html pages

thanks

kevin
cyberman

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by cyberman »

Hmm, not sure, what you want. Do you wanna write static.html pages with CMSms?

Normally mod_rewrite is only for redirecting homepage access ...
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

Yes i  wanna write static.html pages with CMSms, is that possible????
cyberman

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by cyberman »

No, that's not possible.

You can make it only semistatic if you use cache project

http://dev.cmsmadesimple.org/projects/cache/
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

is any one gonna be able to write this?
Pierre M.

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by Pierre M. »

Hello Kevin,

I think you are confusing mod_rewrite and mod_cache.

If mod_cache isn't available in your Apache, you can try a client side static mirroring solution, like wget or httrack. But Cyberman's caching module seems a good way too.

Pierre M.
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

hi,

i was looking for a mod  mod_rewrite to turn say /index.php?page=la-mata-community  IN TO la-mata-commmunity.html

will this be a feature in the furture?
cyberman

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by cyberman »

Please look at config.php - there you will found a parameter "Pretty URL". Set it to true, clear cache and see what you get ...
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

thanks for that i can see it trying to work, but keeps saying URL NOT FOUND this is my config file, is this correct? and do i not have to have a .htacess file

#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = true;

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
Pierre M.

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by Pierre M. »

You page_extension should be '.html', shouldn't it ?
BTW, is your .htaccess OK ?
Pierre M.
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

is there a .htaccess file, i am ment to place in the root folder?
Pierre M.

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by Pierre M. »

yes, pretty URLs are explained in the post install optional settings.
Once your config.php is ready (I suggest '.html' for page extension), use the provided htaccess.txt (renaming it to .htaccess)
This sample file is provided in the docs folder of the CMSms distribution, as written in the doc.
Have fun

Pierre M.
hamood
Forum Members
Forum Members
Posts: 18
Joined: Sat Apr 15, 2006 7:00 pm

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by hamood »

hi,
i just had the same prob.
Here is a new .htaccess file:

Options +FollowSymLinks
RewriteEngine on

# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !/.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /index.php?page=$1 [QSA]

# RewriteRule ^index.php$ / [r=301,l]
# RewriteRule ^page/(.+)$ /index.php?page=$1

Hope this works 4 u
Offline marketing sucks !
Pierre M.

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by Pierre M. »

You may find this tutorial usefull as you are interested in static sites.

BTW, the CMSms package has a (simple) "suitable" .htaccess sample. The documentation has some problems about them currently.

Pierre M.
kevinbarker
Forum Members
Forum Members
Posts: 17
Joined: Tue May 29, 2007 8:56 am

Re: HELP!!! mod rewrite to allow static. html files NEEDED

Post by kevinbarker »

THANK YOU ALL    ;D

I NOW HAVE MY SITE UP AND RUNNING, WITH STATIC .html extension.

for any one esle looking at thie thread this is my config.

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;



.htaccess files contains


Options +FollowSymLinks
RewriteEngine on

# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !/.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /index.php?page=$1 [QSA]

# RewriteRule ^index.php$ / [r=301,l]
# RewriteRule ^page/(.+)$ /index.php?page=$1
Post Reply

Return to “Modules/Add-Ons”