Log In
Sign Up
Why Join Hot Scripts?
Hot Scripts
All Categories
PHP
Python
Tools & Utilities
XML
Ruby on Rails
Ajax
Web Hosting
ASP
ASP.NET
C & C++
CFML
Flash
Java
JavaScript
CGI & Perl
HTML5
Forums
Blog
Scripts
Hosted Apps
Plugins
Design Templates
Forum
Blog
Advertise
Contact Us
Register
FAQ
Rules
Calendar
Search
Today's Posts
Mark Forums Read
RSS Feeds
Current location:
Hot Scripts Forums
»
Other Discussions
»
Web Servers
» .htaccess 301 redirect
.htaccess 301 redirect
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
08-19-08, 07:31 AM
MikeW
New Member
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
.htaccess 301 redirect
Hello
I'm trying to redirect around 5 dynamic urls to subfolders but the script I'm using doesn't seem to work. See below.
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^newfolder/ old-dynamic.php?catid=1 [R=301,L]
can anyone give me any ideas.
MikeW
View Public Profile
Find all posts by MikeW
#
2
(
permalink
)
08-20-08, 10:54 AM
curbview.com
Junior Code Guru
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
MikeW
Hello
I'm trying to redirect around 5 dynamic urls to subfolders but the script I'm using doesn't seem to work. See below.
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^newfolder/ old-dynamic.php?catid=1 [R=301,L]
can anyone give me any ideas.
I don't see where you are trapping the original request. See below a real RewriteRule for an example:
RewriteRule ^([A-Za-z0-9]+)\/newfolder(\/)?$ old-dynamic.php?catid=$1 [R=301,L]
__________________
Whatever you decide, you should make sure best security methods are used and practiced. Should you really need more help, PM me.
curbview.com
View Public Profile
Find all posts by curbview.com
#
3
(
permalink
)
08-29-08, 11:19 PM
wirehopper
-
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
The first string in the rule is the original, the next is what you want it to be rewritten to.
Perhaps the following would work:
Code:
RewriteRule ^old-dynamic.php?catid=1 /newfolder [R=301,L]
wirehopper
View Public Profile
Find all posts by wirehopper
#
4
(
permalink
)
08-30-08, 05:40 AM
curbview.com
Junior Code Guru
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
wirehopper
The first string in the rule is the original, the next is what you want it to be rewritten to.
Perhaps the following would work:
Code:
RewriteRule ^old-dynamic.php?catid=1 /newfolder [R=301,L]
You are giving the OP the wrong answer...! Study the question...
__________________
Whatever you decide, you should make sure best security methods are used and practiced. Should you really need more help, PM me.
curbview.com
View Public Profile
Find all posts by curbview.com
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
[SOLVED] mysql_real_escape_string() causing Apache to crash?
|
Subdomain redirect
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
General Community
Announcements
Polls
The Lounge
New Members & Introductions
Script Requests
HotScripts.com Discussion
Hot Scripts Forum Questions, Suggestions and Feedback
General HotScripts Site Discussion
HotScripts Site Bug Reports
General Web Coding
HTML/XHTML/XML
HTML5
JavaScript
CSS
Flash & ActionScript
Programming Languages
PHP
Perl
ASP
ASP.NET
C/C++
Visual Basic
Windows .NET Programming
Everything Java
Other Languages
Other Discussions
Web Servers
Database
Other Topics
Web Design
API
Frameworks
AJAX
Security
Server Administration
Portable Device Programming
Cloud Computing
Ruby on Rails
CFML
Python
Tools and Utilities
Remotely Hosted
Web Hosting
Advertising Forums
General Advertisements
Job Offers & Assistance
Traffic Exchange
Website Reviews
Web Hosting Talk
DBForums.com
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
[SOLVED] .htaccess 301 redirect
snaip
Web Servers
12
03-09-08
11:15 AM
Really complex redirect 301 - need help!
Josie
ASP
2
07-08-06
05:22 PM
Permanent 301 Redirect to new Domain's URL giving me problems in .htaccess
cebuy
HTML/XHTML/XML
1
03-10-06
11:34 PM
.htaccess problem with new host
SugarChick
Web Servers
0
02-07-06
04:56 PM
.htaccess and PHP Redirect problem
dodod
PHP
3
06-19-05
11:56 PM
All times are GMT -5. The time now is
09:11 PM
.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Share on Facebook
Share on Stumble Upon
Share on Twitter