I’m trying to set up URL rewriting (which I’ve done many times before) using Apache mod_rewrite and it looks like .htaccess isn’t supported on this set up.
I’ve seen somewhere that you can set up rewriting using purely PHP, but I’m struggling to find any information on it. Can anyone point me in the right direction?
That also relies on a .htaccess file.
As far as I know there is no way to create friendly URLs without using any form of .htaccess
I think you’d better contact the hoster to ask if .htaccess files are indeed disabled, and if they are, if they could enable them.
Are you server is Apache btw? If it’s IIS you could use a httpd.conf with ISAPI Rewrite. Provided they have installed that of course.
that’s true. and i suppose if the 404 page has an html extension you’d need to either change the 404 page to be used to a php one, or make it so that html extensioned files are parsed by the php parser, either way, .htaccess required. maybe the OP could request the hosting company to change the not found page to a file path of his choice. if so then it’d be possible.
no, you only send out 404 headers if the page really isn’t found. if it’s an address to be considered valid, you just don’t send out 404 headers from the page not found script.
all requests which aren’t found go to a page not found page. put router-like code in that page’s script. so basically in the not found page, using php, get the url and include() the right file. bingo. no .htaccess file access required what so ever.
As I said above, if it’s an IIS server you may still be able to rewrite if they have ISAPI Rewrite installed as a module for IIS
If they don’t, then there would indeed be no way to do rewrites …