Elxis CMS Forum

Support => General => Topic started by: politservice on May 26, 2023, 02:20:25

Title: The problem with private $SEF = 1;
Post by: politservice on May 26, 2023, 02:20:25
Friendly-url  works on the local server, but does not work when transferred to the Internet.
index.php/mediafiles/
Title: Re: The problem with private $SEF = 1;
Post by: webgift on May 26, 2023, 10:41:22
Hello,
Copy includes/install/data/htaccess.txt to the elxis root folder and rename it to .htaccess
Title: Re: The problem with private $SEF = 1;
Post by: politservice on May 26, 2023, 10:48:50
In the root directory, my .htaccess file looks like this:

##
# Elxis 5.x htaccess file
# Copyright (C) 2006-2019 Elxis.org. All rights reserved.
# License: http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Elxis CMS is a Free Software
##

# Uncomment the lines bellow to add support for HTML5 video and audio
# AddType video/ogg .ogm
# AddType video/ogg .ogv
# AddType video/ogg .ogg
# AddType video/webm .webm
# AddType audio/webm .weba
# AddType video/mp4 .mp4
# AddType video/x-m4v .m4v

## Uncomment the following line, if it produces erors, comment it again
# Options -Indexes +FollowSymLinks

#
#  mod_rewrite in use
#

RewriteEngine On

# The following line tells the web server where your Elxis installation is located in relation
# to the web server root directory. By default this is set to the www root folder ( RewriteBase / ).
# If you have installed Elxis in a sub-folder then set this path properly.
# For example if your elxis site is accessible via this URL http://www.example.com/elxis/
# You should set: RewriteBase /elxis/

RewriteBase /

RewriteCond %{REQUEST_URI} ^.*(wp-login.php)|(wp-admin/)|(wp-content/)|(wp-includes/).*
RewriteRule .* - [F,L]

#
# Rewrite rules for sample multisites appeared as sub-folders of the main site
# RewriteRule ^one/stargate14/inner.php stargate14/inner.php [L]
# RewriteRule ^one/inner.php(.*) inner.php [L]
# RewriteRule ^one/(.*) $1
# RewriteRule ^two/stargate14/inner.php stargate14/inner.php [L]
# RewriteRule ^two/inner.php(.*) inner.php [L]
# RewriteRule ^two/(.*) $1
#

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d

# If you have renamed the administration folder change "stargate14" to the name you have set.
RewriteRule ^stargate14/inner.php(.*) stargate14/inner.php [L]
RewriteRule ^stargate14/(.*) stargate14/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

#
## Security rules. Comment them if they cause problems to your site
#
# Block out any script trying to base64_encode crap to send via URL
# This rule is commented because it may cause some Elxis features to not work!
# RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]


-----------------------------------------------------
Oh great, did as you suggested and it worked!
Title: Re: The problem with private $SEF = 1;
Post by: webgift on May 26, 2023, 10:50:22
Have you installed Elxis CMS on a subfolder?
If no then contact with your hosting provider. Do they provide rewrite module on Apache web server?
Title: Re: The problem with private $SEF = 1;
Post by: politservice on May 26, 2023, 19:56:47
No, it is installed in the root folder
Title: Re: The problem with private $SEF = 1;
Post by: webgift on May 26, 2023, 20:20:06
In the root directory, my .htaccess file looks like this:
...

-----------------------------------------------------
Oh great, did as you suggested and it worked!

??

No, it is installed in the root folder
Have we resolved the issue?
Title: Re: The problem with private $SEF = 1;
Post by: politservice on May 27, 2023, 01:23:54
The problem is solved!
Title: Re: The problem with private $SEF = 1;
Post by: webgift on May 27, 2023, 09:33:53
Aha thank you very much!