• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

cant log into website after .htaccess change Znote 1.5

Jfrye

Mapper, trying to learn scripting
Joined
Jan 8, 2009
Messages
366
Solutions
5
Reaction score
86
Location
Mexico Missouri
As the title says, I made some changes to my .htaccess file to remove the .php extension from my web url. After these changes, I cannot log into the website. I enter login info, hit enter, and the login fields go blank, but nothing happens.

Here is .htaccess that DOES NOT WORK
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.php$ /characterprofile.php?name=$1

# Unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://myserver.no-ip.org/$1 [R=301,L]


# Redirect external .php requests to extensionless url
RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.+)\.php$ http://myserver.no-ip.org/$1 [R=301,L]

# Resolve .php file for extensionless php urls
RewriteRule ^([^/.]+)$ $1.php [L]

Here is the .htaccess that DOES WORK
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /characterprofile.php?name=$1
This is the code that allows me to login to my website, but this is also the code that shows .php extensions in the url.

Does anyone know how to help me fix this, so that I can log into my website, while still removing the file extensions from url?
 
@Cornex when I try that, it doesnt work. I get this

Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
 
Back
Top