Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
Apache Web Server
6:12 am May 2, 2026
This page requires javascript.
Forum Moderators:
phranque
Message Too Old, No Replies
Directory 301 redirect but not files
Pass the Dutchie
Msg#:4092569
10:13 am on Mar 6, 2010
(gmt 0)
So far I am unsuccessfully trying to preserve some inbound links from returning a 403 and would appreciate some help.
Basically, can I return a 301 for a directory without redirecting all the pages within the directory?
jdMorgan
Msg#:4092828
6:02 am on Mar 7, 2010
(gmt 0)
Yes, by using a pattern that looks to see if the requested URL-path ends with a slash, or if it has more path-information following that slash.
Jim
Pass the Dutchie
Msg#:4093241
12:57 pm on Mar 8, 2010
(gmt 0)
Thanks Jim. I found another way by placing index.php into the directory and redirecting that file.
Cheers
g1smd
Msg#:4093494
7:43 pm on Mar 8, 2010
(gmt 0)
That doesn't sound like the best way to do it.
Two lines of .htaccess code will do what you want at the server level, without invoking any disk reads to fetch files first.
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
AdSense Earnings and Observations - April 2026
what do they want?
Hello again, it's been a while
I need some SEO help
SEO question
Do you get tired of others copying your content?
5 SEO Tips That Actually Worked for My Blog in 2026
Home
Forums Index
Server Side
/
Apache Web Server
6:12 am May 2, 2026