mod_rewrite tutorial

Right, further to the question above.

I have tested

RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?page=$1 [L]

on local machine running apache and it runs perfectly!

Uploaded it to Web Mania hosting and it doesnt work. Is there any reason it wouldnt work?

They apparently believe there is no problem at their end.

any ideas?
 
robc123 said:
Right, further to the question above.

I have tested

RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?page=$1 [L]

on local machine running apache and it runs perfectly!

Uploaded it to Web Mania hosting and it doesnt work. Is there any reason it wouldnt work?

They apparently believe there is no problem at their end.

any ideas?

Case sensitivity perhaps? Windows isn't case sensitive, most other OSs are. Check you've not uploaded Index.php/index.PHP/whatever.
 
Hmm, do they allow mod_rewrite & RewriteEngine? I'd be pretty certain they do as normally you get a 500 Internal Server Error when .htaccess is fudged up.
 
By 'not work' - what actually happens?

Also, is the directory structure the same - ie, is the .htaccess file in Apache's root and are you requesting "/something", not "/folder/something", etc?
 
Beansprout said:
By 'not work' - what actually happens?

Also, is the directory structure the same - ie, is the .htaccess file in Apache's root and are you requesting "/something", not "/folder/something", etc?

I get a 404 Error Page not found

I use index.php?page=Contact

which uses a php switch to include files from /Pages directory
 
Back
Top Bottom