Jump to content

Recommended Posts

  • Administrators
Posted

So I'm fairly new to anything advanced with .htaccess files.

 

I just purchased a URL shortening script and tried installing it. I followed the readme.txt perfectly.

 

Now when I hit the site I tries to get me to download the index.php file. If I remove the .htaccess file the page loads fine, but then when you try to click any links I obviously get an error 500 due to the missing .htaccess file. So this tells me there is an issue with the rewrite code. Hopefully someone here can spot the issue :)

 

The Script I purchased: Mee.La

The Site I've installed it on: cbjv.net

 

My current .htaccess file:

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

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /forward.php?$1 [L]
RewriteEngine On
RewriteBase /music
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^api.php?url=(.*)$ ./u/$1 [PT,L,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^cbjv\.net$
RewriteRule (.*) http://cbjv.net/$1 [R=301,L]
AddHandler php5-script .php

  • Administrators
Posted

Thanks Brent, working perfectly now.

 

What exactly was that line doing?

  • Administrators
Posted

You bet!

Since your server is already using PHP, there's no need to tell it to use PHP, which is what that line is doing. By doing so, it cancels the server out, if that makes sense.

 

Ah, ok, makes sense.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...