Welcome Guest, Not a member yet? Register   Sign In
Mod ReWrite help...
#1

[eluser]Unknown[/eluser]
I'm having trouble figuring out how to write my rewrite.

My ultimate goal is:
http://www.domain.com/$USERSITE/$PAGE


My goal for now is:
http://www.domain.com/site/$USERSITE/$PAGE

So on my site controller I have

Code:
function index($usersite, $page)

I have the index.php gone with the below ReWrite.

Code:
RewriteEngine on
RewriteBase /
# Hide the application and system directories by redirecting the request to index.php
RewriteRule ^(application|system|\.svn) index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

When I go to /site it works but when I have that $usersite and $page param on the URL it gives me an internal error 500.

Any advice on the rewrite?

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB