Hi,
having trouble sorting my clean urls. On my other website on a different server it is working fine but ive just set up a site on godaddy and it doesnt seem to want to work the same
I clean the url in 2 parts. I have .htaccess allow the removal of .php but then on the php page i pick up the get variables from the url
This picks up the get variables and is on the page.php
if ($_SERVER['REDIRECT_PATH_INFO']) $_SERVER['PATH_INFO'] = $_SERVER['REDIRECT_PATH_INFO'];
$data = explode("/",$_SERVER['PATH_INFO']);
$_GET['section_one'] = $data[1];
$_GET['section_two'] = $data[2];
$_GET['title'] = $data[3];
this is the .htacess
<IfModule mod_rewrite.c>
RewriteEngine on
# If a script is called without .php extension, but with /variables
RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteRule ^([a-zA-Z0-9\\._-]*)?/(.*)$ $1.php [QSA,E=PATH_INFO:/$2,L]
RewriteRule ^([a-zA-Z0-9\\._-]*)?/(.*)$ $1.php/$2 [QSA,E=PATH_INFO:/$2,L]
# If a script is called without .php extension, and without /variables
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [QSA,L]
# Fix PHP Authentication with FastCGI mode
RewriteCond %{HTTP:Authorization} !''
RewriteRule .*php - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
As said this works on a different server so i think that FastCGI isn’t installed on godaddy. Is there a way to rewrite the .htaccess to get it to work. ultimately i need it to output
www.example.com/page/something/somethingelse
with page being page.php and section_one = something and section_two = something else.
any ideas?
any help appreciated. thanks