Re: Moving to a modified URL



this is just pseudo-php code to get an idea of what should be done.

# add the 404 error handling to apache with .htaccess
ErrorDocument 404 /404.php

# setlang.php to create a language cookie
<?php
setcookie("lang", $_GET['lang'], .....)
?>

#the 404 handler
<?php
header("Location: http://www.example.com/"; . $_COOKIE['lang'] . "/" .
$_SERVER['REQUEST_URI'] . "");
?>

to make it work, links must point to a non-existent file.

.



Relevant Pages

  • Re: Convert from .html to .php - What are SEO implications of file name changes?
    ... you can leave all your pages as .html and any embedded PHP ... I think we are using Apache, so I'll try your suggestion if we are. ... And while we are on the subject of Apache, .htaccess, etc, are there ...
    (alt.internet.search-engines)
  • Re: prevent the direct link with .httaccess file
    ... this .htaccess file in pdfs folder but it allow user to read the file. ... download the pdf file ... as Jerry as already pointed out its not really a php problem. ... Go talk to someone in a apache forum/newsgroup for more info on ...
    (comp.lang.php)
  • Re: [PHP] [HELP] Fatal error when uploading large files!
    ... running PHP 5.1.2 with Apache 2.0.55 on RedHat ES4 and I keep getting the ... following PHP error when trying to upload a larger file. ... AllowOverride turned on in the httpd.conf file so my .htaccess file is below ... maybe setting these ini settings usiong php_admin_value). ...
    (php.general)
  • Re: .htaccess upload_max_filesize ini_set()
    ... I m PHP 5.2.0 / Apache ... I try to update .htaccess ... However it will give me "Internal Server Error" ... It's likely that the apache config file disallows changes to these configuration directives. ...
    (php.general)
  • Re: [PHP] [HELP] Fatal error when uploading large files!
    ... following PHP error when trying to upload a larger file. ... AllowOverride turned on in the httpd.conf file so my .htaccess file is below ... php_value can't overrule a php_admin_value (your apache conf or another .htaccess ... maybe setting these ini settings usiong php_admin_value). ...
    (php.general)