Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Clean URLs without htaccess
Is there a way to get clean URLS working without an htaccess file? My host seems to have blocked the htaccess ‘feature’…
Offline
Re: Clean URLs without htaccess
I don’t think there is…
Offline
Re: Clean URLs without htaccess
Mmh, lovely… Thanks;-)
Offline
Re: Clean URLs without htaccess
Did you check with your host?
Maybe the problem is else where
Offline
Re: Clean URLs without htaccess
Yes, I checked. They simply told me that .htaccess is only available if I pay them some more money for a different hosting-packet.
Offline
Re: Clean URLs without htaccess
I very much doubt that it is achievable without the .htaccess file as it is that file which tells the server to follow a set of rules to interpret the url differently to the normal case of seeing a series of directories/subdirectories; instead the server is pointed to the Textpattern index file. Textpattern then handles the clean urls itself extracting the relevant details.
Offline
Re: Clean URLs without htaccess
Time to move hosts… htaccess should be available on all hosts shouldn’t it?
Offline
#8 2008-11-18 13:28:00
- tbo
- Member
- Registered: 2008-10-24
- Posts: 12
Re: Clean URLs without htaccess
Hi dl33,
if your hoster only forbids to use the “mod_rewrite” module, but allows .htaccess files, it should be possible to get an similar elegant way with a php-script that does the redirecting (also it reduces the apache’s work, compared to mod_rewrite). See this site for an example.
But you have to modify textpattern to work with a php-based-solution like this, because all links have to use the php-file in order to use clean urls … I did it (well, almost) with silverstripe some time ago (same situation: mod_rewrite disabled by the hoster) and it took me a while. So the easiest thing really is switching your hoster or the package ;-)
Best regards,
Tobi
Last edited by tbo (2008-11-18 13:29:12)
Offline
Re: Clean URLs without htaccess
Only the .htaccess file won’t work. I don’t think it has anything to do with mod_rewrite.
Therefore, a word of advice for other users: Hosteurope (German host) is not suitable for textpattern as clean urls won’t work. .htaccess files are only available for certain hosting packages. Check before you choose one.
Last edited by dl33 (2008-11-18 13:30:07)
Offline
#10 2008-11-18 13:31:58
- tbo
- Member
- Registered: 2008-10-24
- Posts: 12
Re: Clean URLs without htaccess
Funny: when I had to deal with this, the package was a cheap one from hosteurope as well.
Offline
Re: Clean URLs without htaccess
mmh, guess I will give your solution a try then…
Offline
Re: Clean URLs without htaccess
Textpattern contains some lesser known code for partly messy URLs, which only require the capability to set a custom error page for “404 Not Found” errors. Might be useful – but certainly not as useful as switching hosts.
Offline