htaccess url change????? - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-10-2011, 05:16 PM   #1 (permalink)
Junior Member
 
Join Date: Jul 2011
Posts: 7
Default htaccess url change?????

Hey Everybody,

I am trying to view a site I am working on offline. Right now it calls all of the pages and all of the images from the live site. I think I have to change the htaccess file but not sure. For example in the header of the site it says <?php echo URL ?> and that is where it is calling the page to load from the live site, but I am not sure where it gets the url to call from. Any ideas.
jbounds is offline   Reply With Quote
Sponsored Links
Old 08-10-2011, 05:34 PM   #2 (permalink)
Junior Member
 
Join Date: Jul 2011
Posts: 7
Default Re: htaccess url change?????

ok, I think I found part of it.

In my head file i found this

<?php
# Site configuration variables
define("URL", "h t t p://nameofsite/");
/*Must update .htaccess file when ready to go live*/
define("SCRIPTS", URL . "/scripts");
define("IMAGES", URL . "/images");

# Database configuration, if applicable
?>

with name of site being the url of the site. I changed that to local host and the name of the site, but its still not working. Not sure if need to change the htaccess file also or if there is something else that I need to do also. Any help would be greatly appreciated.
jbounds is offline   Reply With Quote
Old 08-10-2011, 05:41 PM   #3 (permalink)
Junior Member
 
Join Date: Aug 2011
Posts: 2
Default Re: htaccess url change?????

i think it should work
sasha1grate is offline   Reply With Quote
Old 08-10-2011, 05:55 PM   #4 (permalink)
Junior Member
 
Join Date: Jul 2011
Posts: 7
Default Re: htaccess url change?????

I thought so too, lol. The top part of my htaccess file says

<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>

ErrorDocument 404 /website/404.php

Redirect permanent /about_us website url

and then more permanent redirects too, not sure if I need to make a new htaccess file or what. I tried changing where the permanent reirect points to, but it didn't change anything. I am just using dreamweaver and manually typing everything in in the htaccess file and not sure if I need to do it a different way or what. Also if there is already something on this I am more then willing to read and do the work. Thank you again everybody.
jbounds is offline   Reply With Quote
Old 08-10-2011, 06:33 PM   #5 (permalink)
Junior Member
 
Join Date: Jul 2011
Posts: 7
Default Re: htaccess url change?????

ok, I think that was it. I have xampp and iis7 installed on the computer and was change the wrong head file.
jbounds is offline   Reply With Quote
Old 09-04-2011, 12:19 AM   #6 (permalink)
Junior Member
 
Join Date: Sep 2011
Location: Long Islanf, NY, USA
Posts: 33
Default Re: htaccess url change?????

1) Delete (or rename) the .htaccess file.

2) Change all links to relative. IOW, change the http reference to /

Absolute links are bad programming, unless the file is on an external site.
Rukbat is offline   Reply With Quote
Old 05-16-2012, 05:38 AM   #7 (permalink)
Regular User
 
Join Date: May 2012
Location: usa
Posts: 18
Default Re: htaccess url change?????

Quote:
Originally Posted by jbounds View Post
Hey Everybody,

I am trying to view a site I am working on offline. Right now it calls all of the pages and all of the images from the live site. I think I have to change the htaccess file but not sure. For example in the header of the site it says <?php echo URL ?> and that is where it is calling the page to load from the live site, but I am not sure where it gets the url to call from. Any ideas.
have you put folder code into www or htdocs ?
with following problem.i think that your php codes was not compiled
y8games2012 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:56 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting