GetSimple Support Forum
mod_rewrite - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: mod_rewrite (/showthread.php?tid=195)



mod_rewrite - kotos - 2009-10-29

I have hosting with mod_rewrite on. (I'am sure).
Have my Get Simlpe in catalog /getsimple2 (home/public_html/getsimple2/)
What should i do so my Fancy URLs works fine? Thx for any advice


mod_rewrite - ccagle8 - 2009-10-29

I assume you are using 1.7, correct? Can you paste the contents of your .htaccess file here? In your case, this would be the one in your getsimple2 folder.


mod_rewrite - kotos - 2009-10-29

1.7 right. But have no .htaccess in main folder (getsimple2)
Im trying do it myself and put there rule:

RewriteRule /?([A-Za-z0-9-]+)/?$ /getsimple2/index.php?id=$1 [L]

but it not works :<

Im tried install new get simple but there is this same problem :<


mod_rewrite - ccagle8 - 2009-10-29

try this:
Code:
AddDefaultCharset UTF-8
RewriteEngine on

RewriteBase /getsimple2/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [L]



mod_rewrite - kotos - 2009-10-30

Yessss. Cool. Now works fine.
Thanks for help!


RE: mod_rewrite - puncakpass - 2019-11-06

(2009-10-29, 20:10:54)ccagle8 Wrote: try this:
Code:
AddDefaultCharset UTF-8
RewriteEngine on

RewriteBase /getsimple2/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [L]

hello admin
what is the correct htacces for using URL Fancy
i use this slug
Code:
%parent%/%slug%.html

and htaccess
#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yanaponsel.my.id [NC]
RewriteRule ^(.*)$ http://www.yanaponsel.my.id/ $1 [L,R=301,NC]
#

Code:
AddDefaultCharset UTF-8
RewriteEngine on

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [L]
# GetSimple CMS htaccess ROOT file
# apache 2.4
#

# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives

# override charset
AddDefaultCharset UTF-8

# prevent directory listings
Options -Indexes

# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php


but my post is 404 not found


RE: mod_rewrite - Carlos - 2019-11-07

Check the wiki:
http://get-simple.info/wiki/config:htaccess -> .html instead of slash (/)


RE: mod_rewrite - puncakpass - 2019-11-07

(2019-11-07, 03:17:58)Carlos Wrote: Check the wiki:
http://get-simple.info/wiki/config:htaccess -> .html instead of slash (/)

Hi carlos

Can you post the complete htaccess code?

Im trying to merge htaccess code for alway use www and redirect to non https version while keeping the fancy url

====edit

in case someone need it , heres my working htaccess code


Code:
# Redirect HTTPS to HTTP
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#url fancy
RewriteRule ([A-Za-z0-9-]+).html index.php?id=$1 [QSA,L]

#
AddDefaultCharset UTF-8
Options -Indexes
Options +FollowSymLinks
DirectoryIndex index.php



RE: mod_rewrite - dancretu@hotmail.com - 2022-10-24

I have the same problem.
How can I solve this situation?
My .httacces file is written as follows:
-------------------
#
# GetSimple CMS htaccess ROOT file
# apache 2.4
#

# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives

# override charset
AddDefaultCharset UTF-8

# prevent directory listings
Options -Indexes

# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
<IfModule mod_access_compat.c>
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
Require all denied
</IfModule>
</IfModule>
</Files>

<Files sitemap.xml>
<IfModule !mod_authz_core.c>
Allow from all
</IfModule>
<IfModule mod_access_compat.c>
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
Require all granted
</IfModule>
</IfModule>
</Files>

# handle rewrites for fancy urls
<IfModule mod_rewrite.c>
RewriteEngine on

# Usually RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /pp1/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>
-------------------
What should I do to make my Fancy URLs work well?
Im GetSimple in the directory /public_html/pp1/