Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.htaccess problem

Status
Not open for further replies.

NigeW

Programmer
Jun 10, 2002
134
NZ
Hi there

I have commenced work on a CMS app.


My starting point was creating a dynamic navigation script.

Now I want to ensure my URL's appear as static URL's.

What I want to do is have the URL appear as :


as this will be re-directed to index.php and I'll explode the URL etc to deterimine what content page to serve up.

So I created a .htaccess file with the following :

Code:
RewriteEngine on
RewriteRule    ^(.*)$  index.php T=application/x-httpd-php]


But now my dynamic navigation won't display - all I get are javascript errors.

My initial question is : Does the .htaccess file affect other code within files, e.g.

Code:
<SCRIPT LANGUAGE="JavaScript" SRC="files/scripts/lw_layers.js"></SCRIPT>

I hope someone can shed some light.

Thanks

Nigel Wilson
Christchurch Web Design
 
OK - I have done a bit more research and found some code which enables the javascript top get loaded OK. So my .htaccess files now looks like

Code:
RewriteEngine On
Options +Followsymlinks
rewritecond %{REQUEST_fileNAME} -f 
RewriteRule ^(.*) - [L] 
RewriteRule .*$  index.php  [T=application/x-httpd-php]

So once I changed this things started to work, however if the URL imitated multiple directories, e.g. then the image path was as follows :

Code:
<img src="[URL unfurl="true"]http://mysite.com/services/files/images/arrow.gif">[/URL]

So by putting a <base href=" in the html it fixed all my problems.

If anyone trips over this dribble of a post then I hope you find something of use from it.

Cheers

Nigel Wilson
Christchurch Web Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top