Forum Moderators: phranque
I'm using the following simple mod_rewrite:
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)$ /index.php?page=$1 [L,NS]
This works fine when I access my site via the servers host's domain (not my addon domain) and my subfolder e.g.
[mydomain.hostsdomain.com...] -> index.php?page=page_here
However, when i try to access from my addon domain which points to /mydomain/ folder i get a 500 server error
[mydomain.com...] -> 500 Error
The .htaccess file is in the /mydomain/ folder
Any ideas?
it was the preceeding / before /index.php
However, now the $_GET[] in php has the page as "index.php" rather than whatever comes after the domain.com/page_goes_here
The code now looks like:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*) index.php?page=$1 [L]
any ideas why the page_goes_here isn't being put into the page=$1?
thanks
REQUEST_URI /ghd/dfg
but REDIRECT_QUERY_STRING page=index.php
and QUERY_STRING page=index.php
is it safe to assume it will always be in the REQUEST_URI and cant be hacked or spoofed or pished e.t.c?
is there another way to do this without a redirect so it can be passed directly into $_GET?
thanks
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !index\.php$
RewriteRule ^(.*) index.php?page=$1 [L]