Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 9th, 2013, 12:01 AM
vishal.angre vishal.angre is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2008
Location: Mumbai, India
Posts: 39 vishal.angre User rank is Sergeant (500 - 2000 Reputation Level)vishal.angre User rank is Sergeant (500 - 2000 Reputation Level)vishal.angre User rank is Sergeant (500 - 2000 Reputation Level)vishal.angre User rank is Sergeant (500 - 2000 Reputation Level)vishal.angre User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 2 h 33 m 33 sec
Reputation Power: 11
Send a message via AIM to vishal.angre Send a message via MSN to vishal.angre Send a message via Yahoo to vishal.angre Send a message via Google Talk to vishal.angre Send a message via Skype to vishal.angre
PHP5 - Adding trailing slash using htaccess

Hello Guys,

I written code for adding trailing slash using htaccess. code as below.

RewriteEngine On
Options +FollowSymlinks

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !example.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ /$1/ [L,R=301]

RewriteRule ^index/$ index.php


This code is perfectly working xamp local server.

http://www.domain.com/index/ - executes http://www.domain.com/index.php

But when i upload files on live linux server. it does not work. because index.php available on server like same name not work. If i make it.

RewriteRule ^home/$ index.php

then it will work on server.

http://www.domain.com/home/ - executes http://www.domain.com/index.php


It means, the same file name exists then not work.

Please help on this. what is the problem. any rewrite condition to resolve this problem.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > PHP5 - Adding trailing slash using htaccess

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap