"RewriteEngine On" and static pages
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
"RewriteEngine On" and static pages
Hi,
I seem to miss something.
Due to a hint, I set "RewriteEngine On" in my Apache config and changed the blog configuration about URL forming rewriting to "Use Apache mod_rewrite".
Now static pages are not working anymore: http://www.deimeke.net/dirk/blog/index. ... print.html
Serendipity Version is 1.7.2
Any ideas?
Cheers
Dirk
I seem to miss something.
Due to a hint, I set "RewriteEngine On" in my Apache config and changed the blog configuration about URL forming rewriting to "Use Apache mod_rewrite".
Now static pages are not working anymore: http://www.deimeke.net/dirk/blog/index. ... print.html
Serendipity Version is 1.7.2
Any ideas?
Cheers
Dirk
Re: "RewriteEngine On" and static pages
That seems vaguely familiar ....
Administration / Configuration → Paths → which settings do you have there?
If, for example, you access (staticpage) contacts, you will indeed be returned, but in the address url with a wrong path, which - in pagination - leads to something like this
http://www.deimeke.net/dirk/blog/pages/ ... /P216.html
Administration / Configuration → Paths → which settings do you have there?
If, for example, you access (staticpage) contacts, you will indeed be returned, but in the address url with a wrong path, which - in pagination - leads to something like this
http://www.deimeke.net/dirk/blog/pages/ ... /P216.html
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: "RewriteEngine On" and static pages
Good to know that I am not allone.
Path for contact form: /dirk/blog/index.php?/pages/contactform.html
Configuration paths (I can not remember that I ever touched them):
Code: Select all
Voller Pfad - /srv/www/deimeke.net/dirk/blog/
Upload-Pfad - uploads/
Relativer HTTP-Pfad - /dirk/blog/
Relativer Template-Pfad - templates/
Relativer Upload-Pfad - uploads/
URL zum Blog - http://www.deimeke.net/dirk/blog/
Dirk
Re: "RewriteEngine On" and static pages
Not happend to me, but it sounded familiar to the blogUrl issue and some other thread I remembered...
But this looks good! Does not need to change, IMO.
Was you htaccess file changed, after switching to mod_rewrite in Serendipity?
Since http://www.deimeke.net/dirk/blog/pages/about_me.html (already as nice url) does not do also...
You might also need to test, if your apache config setting regarding mod_rewrite really happens... is the extension modul available and did your reload your webserver? (Test with some small script...)
I assume this issue (and sql error) also happens while in combination with that reverse ORDER BY thing in the config...
But this looks good! Does not need to change, IMO.
Was you htaccess file changed, after switching to mod_rewrite in Serendipity?
Since http://www.deimeke.net/dirk/blog/pages/about_me.html (already as nice url) does not do also...
You might also need to test, if your apache config setting regarding mod_rewrite really happens... is the extension modul available and did your reload your webserver? (Test with some small script...)
I assume this issue (and sql error) also happens while in combination with that reverse ORDER BY thing in the config...
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: "RewriteEngine On" and static pages
In the static pages settings, change the path of the page from /index.php?/page/... to /page; remove the index.php-part.
Regards
Regards
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: "RewriteEngine On" and static pages
Yes, it was changed.Timbalu wrote:Was you htaccess file changed, after switching to mod_rewrite in Serendipity?
Since http://www.deimeke.net/dirk/blog/pages/about_me.html (already as nice url) does not do also...
[/quote]You might also need to test, if your apache config setting regarding mod_rewrite really happens... is the extension modul available and did your reload your webserver? (Test with some small script...)
I assume this issue (and sql error) also happens while in combination with that reverse ORDER BY thing in the config...[/quote]
mod_rewrite works so far and it is loaded by the webserver.
Hmpf, that means I have to find all blog articles that link to static pages?onli wrote:In the static pages settings, change the path of the page from /index.php?/page/... to /page; remove the index.php-part.
That's bad.
Cheers
Dirk
Re: "RewriteEngine On" and static pages
You must have changed something essential, since staticpage nav link http://www.deimeke.net/dirk/blog/index. ... print.html etc do work now as expected... without the need to change to a nice url in that staticpage config.
...and still nice Urls do not work http://www.deimeke.net/dirk/blog/pages/imprint.html ending with an error
Having this, I would request to have a look into your htaccess file, to see what these rules
look like...
...and still nice Urls do not work http://www.deimeke.net/dirk/blog/pages/imprint.html ending with an error
But your index.php is at /dirk/blog/Not Found
The requested URL /index.php was not found on this server.
Having this, I would request to have a look into your htaccess file, to see what these rules
Code: Select all
ErrorDocument 404 /dirk/blog/index.php
DirectoryIndex /dirk/blog/index.php
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: "RewriteEngine On" and static pages
No, the old links seem to remain working. I had the same situation in my own blog. Just try it out with one of the pages.Lux wrote: Hmpf, that means I have to find all blog articles that link to static pages?
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: "RewriteEngine On" and static pages
Yes, I removed the "Use Apache mod_rewrite" option without disabling mod_rewrite.Timbalu wrote:You must have changed something essential, since staticpage nav link http://www.deimeke.net/dirk/blog/index. ... print.html etc do work now as expected... without the need to change to a nice url in that staticpage config.
Where did you get the URL from?Timbalu wrote:...and still nice Urls do not work http://www.deimeke.net/dirk/blog/pages/imprint.html with an errorbut your index.php is at /dirk/blog/Not Found
The requested URL /index.php was not found on this server.
http://www.deimeke.net/dirk/blog/index. ... print.html is working.
This is the complete file /srv/www/deimeke.net/.htaccessTimbalu wrote:Having this, I would request to have a look into your htaccess file, to see what yourlook like...Code: Select all
ErrorDocument 404 /dirk/blog/index.php DirectoryIndex /dirk/blog/index.php
Code: Select all
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?qs=$1 [L]
Dirk
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: "RewriteEngine On" and static pages
I tried and it did not work.onli wrote:No, the old links seem to remain working. I had the same situation in my own blog. Just try it out with one of the pages.Lux wrote: Hmpf, that means I have to find all blog articles that link to static pages?
With the option "Use Apache mod_rewrite" static pages do not work anymore. With the option turned off they are working.
Cheers
Dirk
Re: "RewriteEngine On" and static pages
Mod_rewrite was on and working and you changed the link in the staticpage-configuration itself?
Re: "RewriteEngine On" and static pages
ok thats why...Lux wrote:Yes, I removed the "Use Apache mod_rewrite" option without disabling mod_rewrite
Nowhere. I created it manually to test.... since this is the nice url way which will happen with mod_rewrite ON.Lux wrote:Where did you get the URL from?
Yeah, and that is the fault, since this root .htaccess overwrites or overrules your /dirk/blog/.htaccess file, which is the Serendipity blog .htaccess file. Have a look into this.Lux wrote:This is the complete file /srv/www/deimeke.net/.htaccessTimbalu wrote:Having this, I would request to have a look into your htaccess file, to see what yourlook like...Code: Select all
ErrorDocument 404 /dirk/blog/index.php DirectoryIndex /dirk/blog/index.php
Code: Select all
RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?qs=$1 [L]
This will certainly be the main issue... and might be as well this, from your front-root-index page: http://dirk.deimeke.net/ linking internally to http://www.deimeke.net/dirk/blog/
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: "RewriteEngine On" and static pages
Yes, exactly. This option does not seem to affect existing pages.onli wrote:Mod_rewrite was on and working and you changed the link in the staticpage-configuration itself?
Correction: There is no global setting for static pages. In all blogs I have around 60 (or 80) static pages, I don't have the energy to correct each and every one and all pages and articles that refer to those.
Dirk
Last edited by Lux on Wed Jul 31, 2013 4:29 pm, edited 1 time in total.
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: "RewriteEngine On" and static pages
Yeah, and that is the fault, since this root .htaccess overwrites or overrules your /dirk/blog/.htaccess file, which is the Serendipity blog .htaccess file. Have a look into this.[/quote]Timbalu wrote:This is the complete file /srv/www/deimeke.net/.htaccessCode: Select all
RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?qs=$1 [L]
Hm. Don't like ...
dirk.deimeke.net is a separate subdomain, which is redirected via apache config to the blog. This is out-of-scope, since this generates a new http-request on the client side with the correct domain.Timbalu wrote:This will certainly be the main issue... and might be as well this, from your front-root-index page: http://dirk.deimeke.net/ linking internally to http://www.deimeke.net/dirk/blog/
But, if the root .htaccess overwrites the local config in the directory this is senseless, isn't it?
This is from the blog.
Code: Select all
# BEGIN s9y
DirectoryIndex /dirk/blog/index.php
php_value session.use_trans_sid 0
php_value register_globals off
<Files *.tpl.php>
deny from all
</Files>
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files *.db>
deny from all
</Files>
# END s9y
Dirk
Re: "RewriteEngine On" and static pages
What do you mean by "Hm. Don't like ..." ??
Your blogs htaccess will need this too. I presume.
and
This all is missing. This is the reason why you never have a successfull rewrite.
Your blogs htaccess will need this too. I presume.
Code: Select all
ErrorDocument 404 /dirk/blog/index.php
Code: Select all
RewriteEngine On
RewriteBase /dirk/blog/
RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA]
RewriteRule ^((archives/([0-9]+)\-[0-9a-z\.\_!;,\+\-\%]+\.html)/?) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)\-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)\-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)\-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)\-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)?$ index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^comments/(.*) index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css)$ index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
#RewriteCond %{REQUEST_URI} !-U
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian