Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » /id/title

#1 2007-09-20 22:36:59

Zarathu
Member
Registered: 2006-08-12
Posts: 35

/id/title

How do I configure Apache to allow this type of setup? It isn’t working for me.

?id=messy is the only one that’s working.

Offline

#2 2007-09-20 22:44:39

cykla
New Member
From: Boise, ID
Registered: 2007-09-20
Posts: 9
Website

Re: /id/title

Make sure you have mod_rewrite enabled.

Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines. In Fedora you can find it at /etc/httpd/ directory.) Inside the httpd.conf file find and uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound ‘#’ sign from in front of the line – the # sign is for comments, by removing the # sign, you are uncommenting the line) Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out. (I didnt find these in Fedora, yet my mod_rewrite works great) After you have made the changes and saved them, restart your httpd (apache) server for the changes to take affect. The easiest way to do this is to go to the shell command and type: /etc/init.d/httpd restart (this works for Fedora, might be different for other distributions!)

http://www.tutorio.com/tutorial/enable-mod-rewrite-on-apache

Offline

#3 2007-09-21 00:26:18

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: /id/title

I should’ve included this in my last post, sorry….

I’m using my Win2K server instead of my OpenBSD server. Therefore, AddModule and ClearModuleList result in errors.

Offline

#4 2007-09-21 06:41:32

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: /id/title

What Apache version are you running Zarathu? I’ve got 2.0 running on an Windows XP running Textpattern perfectly. And it shouldn’t be that different between XP and Win2k.

What ClearModuleList does I have no idea since I haven’t seen it in any .conf file ever so no need for it.

Try this:

  1. Check that you have the module on your disk under the modules subdirectory in your Apache program folder.
  2. Uncomment the LoadModule rewrite_module modules/mod_rewrite.so line.
  3. Set up a <Directory /> in the conf-file for the directory that you have your site in and add the line AllowOverride All between the Directory tags.
  4. Save the conf file.
  5. Test the conf file.
  6. Reboot your Apache.

It should be working now if you have the .htaccess file in your sites folder.

Do note, this is a classic Apache install, no XAMP or whatever the bundleversions are called out there. If you want stuff to work and be able to change how they work; install both Apache and PHP individually and by yourself! Both have great Windows installers these days.

MORE INFO

Edit: And since v2.0 both Addmodule and ClearModuleList have been removed.
Text from http://httpd.apache.org/docs/2.0/upgrading.html

The AddModule and ClearModuleList directives no longer exist. These directives were used to ensure that modules could be enabled in the correct order. The new Apache 2.0 API allows modules to explicitly specify their ordering, eliminating the need for these directives.

Last edited by obeewan (2007-09-21 06:44:18)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#5 2007-09-22 02:14:12

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: /id/title

[edit]

Nevermind. I’m almost there.

So mod_rewrite is on and kicking in. The only problem is that whenever I go to click on a permanent link for one of the posts/entries, it goes to the error_default page in TXP:


404 Not Found

Unknown section

?!

Last edited by Zarathu (2007-09-22 02:24:53)

Offline

#6 2007-09-22 12:05:29

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: /id/title

So mod_rewrite is on and kicking in. The only problem is that whenever I go to click on a permanent link for one of the posts/entries, it goes to the error_default page in TXP:

And you haven’t altered the .htaccess file at all right? I got the vanilla one running smoothly.

Have you tried any other of the URL-modes and see if they work?


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#7 2007-09-22 15:51:54

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: /id/title

.htaccess:

#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0

—-EOF—-

Short answer: No.

As far as other URL-modes, none of them work. However, going to these work:

site.com/about
site.com/contact
site.com/archives

“About,” “Contact,” and “Archives” are all sections of mine. They work perfectly.

[edit]

Oh, this is odd. Normally, site.com/article results in a 404 UNTIL I deselect “On front page?” in the “Sections” page in TXP.

Last edited by Zarathu (2007-09-22 15:57:08)

Offline

#8 2007-09-22 16:01:41

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: /id/title

What if you uncomment (remove the #) the first three lines:

#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes

and reboot Apache.

Not that they should have that much of an impact. Just wants to make sure.

Same with #RewriteBase /relative/web/path/ where you change the /relative/jadajada to the location of your website, ex c:/program files/apache group/apache2/htdocs/ for a standard Apache installation.

Note
Uncommenting RewriteBase made my install go bonkers :)

Last edited by obeewan (2007-09-22 16:27:18)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#9 2007-09-22 16:21:01

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: /id/title

Super! It’s working now.

Last edited by Zarathu (2007-09-22 16:25:11)

Offline

#10 2007-09-22 16:24:33

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: /id/title

Does TXP output this error for every plugin?


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#11 2007-09-22 16:25:23

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: /id/title

Negative; it’s working. I fixed it. :)

Offline

#12 2007-09-22 16:27:45

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: /id/title

Lovely.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

  1. Index
  2. » How do I…?
  3. » /id/title

Board footer

Powered by FluxBB