hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : mod_rewrite trouble
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

mod_rewrite trouble

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-19-2005, 09:36 AM
vovanus vovanus is offline
Junior Guru Wannabe
 
Join Date: Jul 2004
Posts: 32

mod_rewrite trouble


I've got a problem with mod_rewrite. Here is my .htaccess

RewriteEngine on
RewriteRule ^(.*)\/(.*)(\.html)$ /index.php?num=1&softimea=$1

When I access the page, it does not show images and all links are broken (the contents of $1 is added to URLs and all paths). What can be the solution?

__________________
Freeware and Shareware Downloads!
softlisting.com

Reply With Quote


Sponsored Links
  #2  
Old 11-19-2005, 10:47 PM
extras extras is offline
Web Hosting Master
 
Join Date: Aug 2005
Location: Canada
Posts: 838
Probably using <base href="/base_path_of_image"> in <head> ... </head> will solve it.
You may need to modify the script in some cases.

By using a separator other than slash, you can avoid these, too.

Example:

Use underscor instead of slash, and modify the RewriteRule accordingly.

RewriteEngine on
RewriteRule ^(.*)\_(.*)(\.html)$ /index.php?num=1&softimea=$1

Reply With Quote
  #3  
Old 11-20-2005, 07:08 AM
vovanus vovanus is offline
Junior Guru Wannabe
 
Join Date: Jul 2004
Posts: 32
Fixed. All I had to do is to change all the paths to absolute.

__________________
Freeware and Shareware Downloads!
softlisting.com

Reply With Quote
Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
ProfitBricks Says its New “Next Generation Cloud” Outperforms Amazon, Rackspace Web Hosting News 2012-09-10 16:35:00
Web Host WebHostForASP.net Launches VPS Hosting Service Web Hosting News 2012-06-29 14:52:22
Monitoring Firm LabTech Software Launches Cloud Delivery Option Web Hosting News 2012-01-27 13:55:36
Outage at HSBC Mainframe Affects Customer Experience Web Hosting News 2011-11-04 20:40:11
Web Hosting Sales Techniques with Mike Zobitz of SingleHop Web Hosting News 2011-08-08 22:12:59


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?