Jump to content

Rewrite Rule Error


unemployment

Recommended Posts

My rewrite rule for RewriteRule ^browser/(.*)$ /browser_support.php?c=$1 [L]  is failing.  I want browser_support.php to be mysite.com/browser rather than  mysite.com/browser_support.php .  All the other rewrite rules work. 

 

Options +FollowSymLinks  
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d  
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^u/(.*)$ /profile.php?u=$1 [L]
RewriteRule ^c/(.*)$ /company.php?c=$1 [L]
RewriteRule ^browser/(.*)$ /browser_support.php?c=$1 [L]

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://mysite.com/ [R=301,L]

ErrorDocument 404 /404.php

Link to comment
https://forums.phpfreaks.com/topic/234931-rewrite-rule-error/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.