Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8386579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:58:46+00:00 2026-06-09T17:58:46+00:00

after several researches a give up and post here , if someone could clearify

  • 0

after several researches a give up and post here , if someone could clearify me a things , it would be nice, thanks

When i use http://site.com/file.php?url=2012/08/15/My-html-page all works fine , ajax sends a post to file.php and display it , but when i use a rewrited by htaccess url http://site.com/2012/08/15/My-html-page.html post form do nothing , it dosent work

Links:

Original : http://site.com/file.php?url=2012/08/15/My-html-page

Rewrited with htaccess: http://site.com/2012/08/15/My-html-page.html

The database entry : 2012/08/14/My-first-post

To add a html agter pages i added

$url=$url.'.html'; 
$url= $_GET["url"];

My ajax that in file.php

<SCRIPT language="JavaScript">

$(function() {
$(".comment_button").click(function()
{

var element = $(this);
var note = $("#note").val();
var dataString = 'note='+note;


if(note=='')
{
$('#flash').fadeIn("fast");
}
else
{
 $.ajax({
 type: "POST",
 url: "file_post.php",
 data: dataString,
 cache: false,
 success: function(html){
 $('body').load('/<? echo $url ?>.html');
 }
 });
 }
return false;
});
});
</script> 

my form that in file.php

 <form name="comment" method="post" action>

 <button class="comment_button" type="submit"><span>Отправить</span></button>
 <textarea name="note" id="note"></textarea>
 </form> 

My php file in file_post.php

if(isSet($_POST['note']))  {

$note=$_POST['note'];
$note = html_entity_decode($note);
$date=date("Y-m-d");
$time=date("H:i:s");

$table = "insert into comment (note, date, time) values ('$note', '$date', '$time');";
mysql_query($table);


}

My htacces

 Options +FollowSymLinks
 Options -Indexes
 RewriteEngine On
 RewriteBase /

<Files inc/config.php>
deny from all
</Files>

RewriteRule ^([a-zA-Z0-9-/]+).html$ file.php?url=$1 [QSA,L]
RewriteRule ^([a-zA-Z0-9-/]+).html/$ file.php?url=$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

the $_SERVER[‘REQUEST_URI’] on rewrited page gives me a empty input , its normal ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:58:48+00:00Added an answer on June 9, 2026 at 5:58 pm

    i dont know what was the error , something with a slashes or numbers and htaccess
    but i found a solution with

    RewriteRule ^read/([A-Za-z0-9\-_]+]*)$ file.php?url=$1 [L] 
    

    without html or php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with someone who's looking to get back into programming after several years
After looking at several questions/answers here, I'm not seeing what I think I need.
After several days of searching, trying and head-banging, I post this question to SO
I am having a strange issue with jScrollPane plugin. After several days of using
The example code of section 10.6, the expected result is: after several iterations, the
After using several non compatible barcode generators gems in rails 3.2, i am trying
After reading several articles of a hierarchical data tables, I've made my way into
After reading several questions regarding problems with compilation (particularly C++) and noticing that in
After a several hour (re)search, I just can't come up with a explainable difference
I'm getting back into web design after a several year break, so a lot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.