PHP - Htaccess Not Working On New Computer
i have recently bought a new samsung netbook so i downloaded the latest version of WAMP to develop my site. However when i run my site i get the internal server error associated with the htaccess file. The thing is that this file works on my desktop pc. The version i have of WAMP on this netbook is newer than the one i have at home, socould this be the problem? i can post the contents of the htaccess file if you think it will help, its just a lot of rewrite rules.
Thanks Similar TutorialsHi, I have the following file structure /.htaccess /index.php /displaypage.php All files are on root. I have following written in .htaccess file Options FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-z0-9-]+)$ displaypage.php?page=$1 [NC,L] I have following written in displaypage.php echo $_GET["page"]; Now when I run http://localhost/ then it shows index.php page which is correct. If I run http://localhost/something then it shows a blank page. Previously it used to display that "page" variable on screen. mod_rewrite is enabled and I am using Windows with XAMPP. What am I doing wrong? Thanks Hi all. I dont knw why I still can't get it right after many tries. The .htaccess just can't locate the .bypassed file. On my domain I created a folder called hidden in my web root and this is my authfile path: /www/hidden/.htpasswd but still no show. pls what am I missing here. I even tried it on localhost: /www/my_folder/hidden/.htpasswd same no show. help pls. thanks Hi,
can anyone tell me what im doing wrong. below is a rewrite rule saved as .htaccess. the page loads and i dont get a 500 error but the url didnt change like it should have in the rewrite rule. The .htaccess is located in the root folder. Any idea what i'm doing wrong guys? <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^products/$ view/inventory.php </IfModule> Is there a way to get my visitors PC or Device Name? I am not looking for server name or ip. I need to get my current visitors computer name. Example: MAIN, HOME, OFFICE, TOM32154}}{|\] like when first naming a PC with a new windows install. I have used sessions before I don't know whats going on. My sessions wont die. this is what im doing: <?php session_start(); $_SESSION['user'] = $_POST['email']; $_SESSION['pass'] = $_POST['pass']; ?> ok new page <?php session_start(); echo $_SESSION['user']; echo "<br>"; echo $_SESSION['pass'] ?> OK great is show the same info but now if I close my browser and go back to the second page where it echos it still shows the user//pass I have tried restarting and it still saves the dam session! Should it kill the session if i close my browser? wtf? I am trying to pull in computer information using PHP for program compatibility and want to know if it is possible and if so, what functions to use. Hey, I'm trying to code a page which is supposed to bring up the time of a person's computer. Is this possible without majorly complicated coding? I'm good with GMT offsets and stuff but I don't know how to get the time of a person's computer. I don't want other stuff, just the time so I can edit the time based on where they are. I don't know if I'm making sense so here's an example... If someone does a forum post at 2pm Sydney time but it's 5pm Perth time. How can I make it so that someone in Perth sees 5pm but someone in Sydney sees 2pm...without them manually telling me their timezone? I read about using IP addresses but don't know much (Ok anything) about this , any hints or good sites to view would be appreciated? Or the answer if it's not too complex. Preferably I'd like to get the time in the 11 digit "time()" format so I can use it in tables and translate it with an existing function. IceKat Hi all, I've created a data-entry HTML page that posts to update.php. I am using mysql to store the data entered. When I enter data and hit "update database" button, the php file pops up and correctly shows the data entered, but the update.php file does not show that same data on another computer. I have checked the mysql database and it clearly shows that it the new data has been stored. Why isn't the data showing up on any other computer? I can provide codes as needed. Thanks. Richard I am running php on one computer at work and want other users on other computers to access the index page by sharing it.after mapping the page, I see no data on the other machine. Does php, as pache need to beer installed on other computers footer it too work properly I know about
<input type="file" >which allows one to upload files from one’s computer. But now I need a pop-up window that allows the user to choose first if he uploads from his computer or from the internet. How may I achieve that ? This question is perhaps better suited for the "Javascript" or even "AJAX" forum ; if someone advises me to, I will move that question and put it in the appropriate forum. Hi, i have problem with libraries, with fpdf and PHPEcel, problem is same... Can't open file C:\xampp\htdocs\skripta\.... - this is path to php script on my computer everything work ok on localhost when i test, but when i upload to web server, pdf script try to create file with old windows path: Can't open file C:\xampp\htdocs\skripta\, and not with linux path... does anyone have solution, and why is that? This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318425.0 Hi, I have a challenging dilema. A client keeps track of his stock using a microsoft access database in store. His ecommerce website which is hosted elsewhere uses php and mysql. Is it possible to to integrate the 2 so that when someone buys a product from the website, the store MS access database is updated to reflect this and vice versa? If so how would I go about it? Thanks in advance. P.S: I'm extremely tempted to suggest that he should stop using his ms access db and instead reccommend that I set him up a suitable backend on his website for keeping stock control, then he just login to that in the store. Is there a reason why on my local machine with php, my login system works, but then when I upload my files and test it on my web host, the login system doesn't work properly. I'm using the same php version on my local machine and on my webhost, so I don't understand why it wouldn't work the same. When I try logging in on my webhost, everything processes as normal when a correct user/pass combo is found in the database, however, my session just doesn't seem to be saved, and therefore I won't be logged in. It'll end up refreshing to the home page (as I have it setup), but it won't show me as logged in. Is there something special I need to do in order for the session to be stored correctly? (I realize I haven't pasted any code, but I'm not sure exactly how much code would be needed for me to show in order to resolve the issue). Hello Good day,
I am have a project for company. Can you please give me advice on how will I going to determine each computer assigned to each employee.
I have my own working unit (PC), of course that i used to login on our company web site. But when someone try to log in on our web site using their own account on my working unit it will be registered as fraud.
My problem is how will i am going to check if accountTwo try to log in on accountOne pc unit. Right now we're using cookie but if they use other browser or private browser the data on the cookie was not send on the request.
Righ now I am trying to determine using Mac Address of each PC, but still can't figure out how to get the Mac Address. It gives the server address where the site was hosted.
<?php shell_exe ("172.18.9.25\photoshop\photoshop.exe"); ?> When I run this from the server computer program opening. But when i tried from a diferent computer it is only downloading the exe file to the client computer. How can I open the application from a diferent computer in the same network. Hi people i have this link http://localhost/ViewCategory/PHP my problem is everytime i put / from PHP/ it will redirect me to Access forbiden andd return me this http://localhost/C:/xampp/htdocs/index.php?Active=ViewCategory&PostCategory=PHP/
how to fix it this is how my htaccess code
Options -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{DOCUMENT_ROOT}/$1 -f RewriteRule ^[^/]+/([^.]+\.(?:js|css|jpe?g|png|gif))$ /$1 [L,R=301,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9-z\-]+)/?$ index.php?Active=$1 [L] RewriteRule ^([a-zA-Z0-9-z\-]+)/([^.]+)$ index.php?Active=$1&PostCategory=$2 [L]
Hi how can I make this URL clean http://localhost/?Active=View&PostCategory=1 i want to remove the ?,&, = make them into / this is the php code that manipulate the link <?php Class ControlURL{ public static $_page = "Active"; public static $_folder = Web_Body; public static $_params = array(); public static function cPage() { if(isset($_GET[self::$_page])){ return $_GET[self::$_page]; }else{ return 'index'; } } public static function getPage() { $page = self::$_folder.DS.self::cPage().".php"; $error = self::$_folder.DS."error.php"; if(is_file($page)){ return $page; }else{ return $error; } } }
Hi, Was woudering if someone could help? I would like to stop people accessing a folder (web directory) on my domain using the .htaccess. However the folder contains scripts in it that i use thererfore a redirect away from that folder does not work. can you help? Hi can someone help me i have this .htaccess code
Supposed i have RewriteRule ^([a-zA-Z0-9-z\-]+)/([^.]+)/([a-zA-Z0-9-z\-]+)$ index.php?Active=$1&PostID=$2&PostName=$3 [L]
this line wont work ##RewriteRule ^([a-zA-Z0-9-z\-]+)/([^.]+)$ index.php?Active=$1&PostCell=$2 [L] so i commented it
i need to make them both work for pretty urls Options -Indexes Options +FollowSymLinks -MultiViews RewriteEngine On ErrorDocument 404 /404.html ErrorDocument 401 /404.html ErrorDocument 403 /404.html ErrorDocument 404 /404.html ErrorDocument 500 /404.html RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} /(.*)/$ RewriteRule ^ /%1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{DOCUMENT_ROOT}/$1 -f RewriteRule ^[^/]+/([^.]+\.(?:js|css|jpe?g|png|gif))$ /$1 [L,R=301,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9-z\-]+)/?$ index.php?Active=$1 [L] ##RewriteRule ^([a-zA-Z0-9-z\-]+)/([^.]+)$ index.php?Active=$1&PostCell=$2 [L] RewriteRule ^([a-zA-Z0-9-z\-]+)/([^.]+)/([a-zA-Z0-9-z\-]+)$ index.php?Active=$1&PostID=$2&PostName=$3 [L] Thank you in advanced. Edited May 27, 2020 by azumica |