.htacces trouble

lewisoconnor88

New Member
Messages
2
Reaction score
0
Points
0
Hi everyone,

I've been developing my site locally with XAMPP and normally remove the php extension from the url, just for cleaner urls.

the .htaccess file has:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

This works great locally, but online i get:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.


Really don't know why it would make a difference being on a server??

Any help is greatly appreciated :)

Lewis
 

vv.bbcc19

Community Advocate
Community Support
Messages
1,524
Reaction score
92
Points
48
The site can work with even an empty .htaccess file.This is from my experience.
But being a really powerful tool,.htaccess is to be edited very carefully.
Here is a basic tutorial.
Though a bit lengthy, it is a nice way and easiest of all I knew.
This could help you if you follow it and that works on X10.
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
@ vv.bbcc19 :
He probably knows about empty .htaccess and clearly says what he wants to acheive, if you can point out what's the mistake in his code, it would make more sense-no offence.
I'm not sure about this but did you try adding:
Options +FollowSymlinks
?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
After RewriteEngine on, add a line

RewriteBase /

It is because of the shared server set up.
 

lewisoconnor88

New Member
Messages
2
Reaction score
0
Points
0
Guys, thank you all for your help!

Adding "RewriteBase /" worked great, thanks very much descalzo.

\m/

Lewis
 

indie(Function)

New Member
Messages
2
Reaction score
0
Points
0
I just followed this example, and this is my code:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

However, http://www.indieFunction.com/radio/ returns a 500 Internal Server error... does anyone have any tips?
 
Top