Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Post your Clean URL .htaccess tweaks here
OK, good points, we’ll see how we can make it clearer that people find the relevant FAQ items. We do have this item http://textpattern.com/faq/52/500-internal-server-error which also links to the one for tweaking .htaccess. If you have any sugestions on how to reword things, I am listening.
Should I use RewriteBase instead of /index.php? Are there times when they wouldn’t behave the same?
It’s a general solution that also works when textpattern is in a subdirectory not the webroot. But I think either way is fine in terms of functioning properly – at least I haven’t heard otherwise.
Offline
Re: Post your Clean URL .htaccess tweaks here
The FAQ is clear. I honestly usually search the forum first. I’ll just have to change my habits ;)
If there was an easy way to mirror the faq in forum without making extra work for you developers, that’d be great. Or maybe just a link by the search box.
Thanks for your endless work and tireless help. It’s very much appreciated…
Last edited by mwillse (2006-10-18 17:57:13)
Offline
Re: Post your Clean URL .htaccess tweaks here
is there a way to make clean file download urls, that show the actual filename instead of the file id number?
Offline
Re: Post your Clean URL .htaccess tweaks here
I confirm that mkorsakov’s method (post #12) works for 1und1.de. Thanks a lot.
Also, I do not recommend 1und1.de as a good host, their FTP and MySQL services are very, very slow, at least in my case, and the site i’ve got running on 1und1 isn’t heavy at all.
Last edited by jan (2006-11-05 00:24:36)
Kensington TXP powered rock
Offline
Re: Post your Clean URL .htaccess tweaks here
I had a couple frustrating days trying to figure out why an .htaccess file was working fine on one site, but not on another on the same host – but then I checked the permissions. The ones that weren’t working had permissions set to 000, so they could not be accessed. They should be at 644. You can change this with most ftp programs such as Fetch.
I’m using aplus.net, and the htacces file reads:
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
RewriteBase /
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
Last edited by nabrown78 (2006-11-11 22:38:50)
Offline
Re: Post your Clean URL .htaccess tweaks here
Thought I’d post this for Windows users using Uniform Server for WAMP.
Stock htaccess, just uncomment Options +Follow Symlinks to get clean URLs working:
#DirectoryIndex index.php index.html
Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
If you’ve got multiple TXP installs on your localhost install, it’d be easier to upload an htaccess file in the root containing Options +FollowSymLinks
, so you don’t have to uncomment that line for each install.
Offline
Re: Post your Clean URL .htaccess tweaks here
1.
www.pcextreme.nl
2.
Textpattern versie: 4.0.4 (r1956)
Laatste update: 2006-10-27 16:07:24/2006-10-27 14:42:31
Document root: /usr/local/apache/htdocs
$path_to_site: /home/misterdutch.nl/www/txp
Pad naar textpattern: /home/misterdutch.nl/www/txp/textpattern
Permanente link modus: year_month_day_title
Tijdelijke bestanden map: /home/misterdutch.nl/www/txp/textpattern/tmp
Site URL: www.misterdutch.nl/txp
PHP versie: 5.1.4
Lokale server tijd: 2006-12-01 18:44:49
MySQL: 5.1.9-beta-log
Localisatie: nl_NL.UTF-8
Server: Apache
Apache versie: Apache
PHP server API: apache
RFC 2616 headers:
Besturingssysteem van de server: Linux 2.6.10-web-pcx-rsbac
Actieve plugins: rss_suparchive-0.18m, ajw_notepad_public-0.1m, rss_admin_db_manager-4.2
inhoud .htaccess bestand:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
RewriteBase /txp/
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php </IfModule>#php_value register_globals 0
————————————
So, Clean URLs are working, but all URLs in the archive page(s) (archief_nieuws; archief_weblog) must have + “../”
Can that be changed into URLs without “../” … any help is welcome!
Last edited by RedFox (2006-12-01 17:52:55)
Offline
#56 2007-01-26 07:23:12
- pastafiend
- New Member
- Registered: 2007-01-26
- Posts: 7
Re: Post your Clean URL .htaccess tweaks here
1.
Using 1and1
2.
Textpattern version: 4.0.4 (r1956)
Last Update: 2007-01-26 06:24:05/2007-01-26 06:17:26
Document root: /kunden/homepages/37/d124162428/htdocs/agent-gamer (/homepages/37/d124162428/htdocs/agent-gamer)
$path_to_site: /homepages/37/d124162428/htdocs/agent-gamer
Textpattern path: /homepages/37/d124162428/htdocs/agent-gamer/textpattern
Permanent link mode: section_id_title
Temporary directory path: /homepages/37/d124162428/htdocs/agent-gamer/textpattern/tmp
Site URL: www.agent-gamer.com
PHP version: 4.4.4
Register globals: 1
Server Local Time: 2007-01-26 02:18:30
MySQL: 4.0.27-standard-log
Locale: en_US.UTF-8
Server: Apache/1.3.33 (Unix)
PHP Server API: cgi
RFC 2616 headers:
Server OS: Linux 2.4
Pre-flight check:
————————————
Clean URL test failed.
————————————
.htaccess file contents:
————————————
RewriteEngine On RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) � [PT,L] RewriteRule ^(.*) index.php
————————————
This is the only configuration that wouldn’t give me an error, but it still doesn’t enable clean URLs. I know how to read and follow instructions, but I’m not really a master at figuring these types of things out on my own.
Edit: Guh… I’m using CGI so I’m out of luck for clean URLs :(
Last edited by pastafiend (2007-01-26 07:27:09)
Offline
Re: Post your Clean URL .htaccess tweaks here
>pastafiend
I can confirm that the following works at 1and1
DirectoryIndex index.php index.html
Options +FollowSymLinks
RewriteBase /
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
Offline
#58 2007-01-27 03:39:59
- pastafiend
- New Member
- Registered: 2007-01-26
- Posts: 7
Re: Post your Clean URL .htaccess tweaks here
It worked! Thanks for your help!
Offline
#59 2007-02-08 15:55:59
- kevinmcdougall
- Member
- Registered: 2007-02-08
- Posts: 55
Re: Post your Clean URL .htaccess tweaks here
Thanks mrdale and pastafiend
The htaccess you posted for 1and1 also works for Claranet’s Clarahost in UK. I’d almost given up hope of getting clean URLs to work, and after patiently trying numerous variations I was starting to lose the will to live until I got lucky with this one.
Nice one, thanks again!
Offline
#60 2007-05-22 18:15:50
- marone
- New Member
- Registered: 2007-05-22
- Posts: 3
Re: Post your Clean URL .htaccess tweaks here
i think im using the exact same settings but somehow it doesnt work :(
im also hosting at 1&1, using apache 2 + the current version of textpattern (4.0.4 (r1956)) with the .htaccess posted above:
Textpattern version: 4.0.4 (r1956)
Last Update: 2007-05-22 13:28:21/2006-08-31 15:47:57
Document root: /home/www/vhosts/konsumzentrale.polsterei-reinke.de/htdocs
$path_to_site: /home/www/vhosts/konsumzentrale.polsterei-reinke.de/htdocs
Textpattern path: /home/www/vhosts/konsumzentrale.polsterei-reinke.de/htdocs/textpattern
Permanent link mode: section_id_title
Temporary directory path: /home/www/vhosts/konsumzentrale.polsterei-reinke.de/htdocs/textpattern/tmp
Site URL: konsumzentrale.polsterei-reinke.de
PHP version: 4.3.10
Server Local Time: 2007-05-22 20:10:30
MySQL: 4.1.10a
Locale: en_US.UTF-8
Server: Apache/2.0.53 (Linux/SUSE)
Apache version: Apache/2.0.53 (Linux/SUSE)
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Linux 2.6.9-023stab041.3-smp
Active plugins: chh_if_data-0.10
Pre-flight check:
————————————
Clean URL test failed.
————————————
.htaccess file contents:
————————————
DirectoryIndex index.php index.html
Options +FollowSymLinks
RewriteBase /
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
————————————
maybe i missed something in the vhost / httpd.conf settings
thanks so much for any help
Offline