Jump to content

What Is Wrong With My .htaccess File


Jamesking56

Recommended Posts

What is wrong with my .htaccess file below? it produces an error 500?

Options +FollowSymlinksRewriteEngine onRewriteCond %{http_host} ^pasteme\.uk.to [NC]RewriteRule ^(.*)$ [url="http://www.pasteme.uk.to/$1"]http://www.pasteme.uk.to/$1[/url] [R=301,NC]RewriteRule ^([a-zA-Z0-9_-]+)$ show.php?id=$1RewriteRule ^([a-zA-Z0-9_-]+)/$ show.php?id=$1RewriteRule ^action/([a-zA-Z0-9_-]+)$ action.php?do=$1RewriteRule ^action/([a-zA-Z0-9_-]+)/$ action.php?do=$1

Link to comment
Share on other sites

I thought your RewriteRules that aren't redirects had to be separated by a / :RewriteRule ^([a-zA-Z0-9_-]+)$ /show.php?id=$1RewriteRule ^([a-zA-Z0-9_-]+)/$ /show.php?id=$1RewriteRule ^action/([a-zA-Z0-9_-]+)$ /action.php?do=$1RewriteRule ^action/([a-zA-Z0-9_-]+)/$ /action.php?do=$1However, you also need to allow the for http://blah bit with .* ://like this for the last twoRewriteRule ^(.*)action/([a-zA-Z0-9_-]+)$ /$1action.php?do=$2RewriteRule ^(.*)action/([a-zA-Z0-9_-]+)/$ /$1action.php?do=$2//these first ones are funny, because you are capturing everything, including the http, and throwing it out as the id= variableRewriteRule ^([a-zA-Z0-9_-]+)$ /show.php?id=$1RewriteRule ^([a-zA-Z0-9_-]+)/$ /show.php?id=$1//maybe like this:RewriteRule ^(.*)/([a-zA-Z0-9_-]+)$ /$1/show.php?id=$2RewriteRule ^(.*)/([a-zA-Z0-9_-]+)/$ /$1/show.php?id=$2

Link to comment
Share on other sites

RewriteRule ^(.*)/(.*)$ /$1/show.php?id=$2 [L]RewriteRule ^(.*)action/(.*)$ /$1action.php?do=$2 [L]Try those

Link to comment
Share on other sites

Let's see the new file in its entirety?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...