SEF. problem

Started by waltmeister, 8 years ago

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

waltmeister

*
8 years ago
Hello! Help please. I do not know the syntax of regular expressions, and hard to make the right htaccess for apache 1.3.
My htaccess was:

Code Select
<IfModule mod_rewrite.c>
 RewriteEngine on
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.my-site\.info$ [NC]
RewriteRule ^(.*)$ http://my-site/$1 [R=301,L]


Then I set the portal and modified it:

Code Select
<IfModule mod_rewrite.c>
  RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www.my-site\.info$ [NC]
RewriteRule ^(.*)$ http://my-site.info/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


Site address has syntax http:/my-site.info
SEF is working on the forum, the links are of the form index.php / topic, 1.0.html.
If you turn SEF on the portal, it does not work, articles not available

Feline

*
#1
8 years ago
You need only follow on your .htaccess
Code Select

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Many are stubborn in relation to the way, but less in relation to the target.

waltmeister

*
#2
8 years ago
does not work. In some sections of the forum can not get, and some have a view http://my-site.info/-2/
In .htaccess has left only
Code Select

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

It can not be explained by the fact that the provider uses old apache?
The forum is in cp1251, and all on localhost transliterated correctly.

Feline

*
#3
8 years ago
Well .. apache 1.3 is end of life, is nevermore supported and don't support mod redirect.
So you have to update your server to apache 2.2.
See also http://httpd.apache.org/docs/1.3/howto/htaccess.html
Many are stubborn in relation to the way, but less in relation to the target.

waltmeister

*
#4
8 years ago
Quote from: feline, 8 years ago
Well .. apache 1.3 is end of life, is nevermore supported and don't support mod redirect.
So you have to update your server to apache 2.2.
See also http://httpd.apache.org/docs/1.3/howto/htaccess.html


I do not think that the provider for my sake will update their software ... Disabled SEF. Thank you for your help and great site! O0

Feline

*
#5
8 years ago
Seem like that apache 1.3 don't suuport the QSA flag.
In this case you have to use follow .htaccess and a small change in the PortaMxSEF.php file

.htaccess
Code Select

<Ifmodule mod_rewrite.c>
rewriteEngine on
rewriteCond %{REQUEST_FILENAME} !-f
rewriteCond %{REQUEST_FILENAME} !-d
rewriteRule (.*) index.php
</Ifmodule>


In the file PortaMxSEF.php find the code:
Code Select

// Parse the url
if(!empty($_GET['q']))
{
$querystring = pmxsef_query($_GET['q']);
$_GET = $querystring + $_GET;
$_SERVER['QUERY_STRING'] = pmxsef_build_query($querystring, '', ';');


add before:
Code Select

if(!isset($_GET['q']))
$_GET['q'] = str_replace($boardurl, '', urldecode($_SERVER['REQUEST_URL']));


Now check if it works with apache 1.3
Many are stubborn in relation to the way, but less in relation to the target.

waltmeister

*
#6
8 years ago
Thank you very much! I'll be back from a trip - try to play more.

* Shouts

Feline
a year ago
Today we update our Forum to the Version 1.45
Feline
a year ago
Today we update our Forum to Version 1.4
This release is full compatible with the EU GDPR
Feline
a year ago
Update for PortaMx 1.54 ecl released.
With this updates the Portal works with PHP 7.x and SMF 2.0.15
Feline
a year ago
PortaMx Forum 1.3
released !

*
Feline
a year ago
Today we switched to PHP 7.2 and activate Opcode caching.
Fast .. Very fast *
Feline
2 years ago
Today we upgrade our old SMF 2.0 Forum to PortaMx Forum *

* Calendar

Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30