Jump to content

.htaccess Rewrite


Recommended Posts

I have some problems with my .htaccess file. I've tried placing the .htaccess file in my very root and in the folder I actually want it in, but I keep getting a 500 error. Once I delete the file the problem is gone. This is the piece of code I'm using:

--

Options +FollowSymlinks

RewriteEngine on

RewriteRule ^edit/([^/]+)/([^/]+) /edit.php?cat=$1&id=$2 [NC]

--

 

And I've also tried this:

--

RewriteEngine on

RewriteRule ^edit/([^/]+)/([^/]+) /edit.php?cat=$1&id=$2 [NC]

--

 

Is this just an error in my script, is this functions turned off somehow, or... could anyone help me?

Link to comment
Share on other sites

Error 500 very often mean that there is syntax error in the .htaccess file.

 

First thing I recommend you to check is the way you are saving this file. Use pure ascii only, do NOT save it using UTF-8 or Unicode etc., non-ascii characters such as in example BOM (byte order mark) may result with syntax error.

 

 

After you'll resolve your issue with error 500, remember that when being on a virtual host you have to provide RewriteBase when using mod_rewrite.

Link to comment
Share on other sites

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...