Htaccess Redirect Problem


 
Thread Tools Search this Thread
Top Forums Web Development Htaccess Redirect Problem
# 1  
Old 07-25-2015
Htaccess Redirect Problem

Hi,

I have this string that I need to match and redirect to an actual live url.

I have tried what I know and it won't match. This is the url I want to match.

here is my attempt at a pattern match

Code:
RewriteCond %{REQUEST_URI} ^/smf_test/$
RewriteCond %{QUERY_STRING} ^topic=([0-9]+)\.([0-9]+);wap2$
RewriteRule ^.*$  /smf/index.php/topic,%1.%2.html? [R=301,L]

I have many with different topic numbers that I need to redirect. So this will be a great help to get this solved.

Thanks,

Randal
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with << redirect - Please help!

I have a script to send an email like below. Problem is, the if ..fi block is not getting executed, and is coming as a part of the email body. Can anyone take a look at this? :confused: Log file shows this: SEND_MAIL.prog: line 64: : command not found echo "Input Parameters" echo... (11 Replies)
Discussion started by: mansmaan
11 Replies

2. Web Development

.htaccess redirect with #

I have the following directive in my .htaccess: #RewriteRule ^mozrank/?$ "http://www.seobook.com/#a_aid=dh" The problem is that the redirect is going to http://www.seobook.com/%23a_aid=dh How to preserve the # when redirecting? (2 Replies)
Discussion started by: rlopes
2 Replies

3. Shell Programming and Scripting

Redirect Problem

Hi, I have perl script which is calling an external command using "system()" with argument. But i am not able to capture the output.Even tried with backtick also with no luck. . . $number=<>; system ("cmd $number >output.txt"); (2 Replies)
Discussion started by: rasingraj
2 Replies

4. UNIX for Advanced & Expert Users

Redirect with htaccess

Hi, I would like to use htaccess 301 redirect with URL hiding. Ex: when browse the website 'abc.com' it should show the contents of the page 'xyz.com/start/index.html' but in addressbar should show the domain 'abc.com'. I know it works with html URL frame rewrite. But my question is it... (0 Replies)
Discussion started by: chandranjoy
0 Replies

5. UNIX for Dummies Questions & Answers

Redirect with htaccess to upper level folder, how to?

Hello, Well I have a web with a very bad structure (a vBulletin forum) and I want it redirected to a newer folder in the same server but with a upper level folder. Current structure is: https://www.unix.com/vbulletin/upload/index.php And I want it to be:... (0 Replies)
Discussion started by: Rafaweb
0 Replies

6. UNIX for Advanced & Expert Users

.htaccess redirect with masking

I am looking to forward the following with masking via my .htaccess file: www.mywebsite.com/origpage www.mywebsite.com/newpage I do not want to forward the entire site, just this one page with masking. Neither page has an extension. I am able to forward with .htaccess - but it does not mask the... (1 Reply)
Discussion started by: globalnerds
1 Replies

7. Solaris

Cron redirect problem

Hello all, I have a script that I am trying to execute and redirect the output to a file, but I have trouble in redirection. The cron job is running properly as I see it in the mail. This is what I am doing In crontab file, 0 4 * * * somescript.sh > /some_location/`date '+%m%d%y_%H%M'`.log... (9 Replies)
Discussion started by: grajp002
9 Replies

8. Shell Programming and Scripting

Redirect Problem

I am using the time command in a script however the output of the time command will display on my screen but not my output file. Any Ideas on how to fix this? > cat test.sh ############################# #!/usr/bin/sh for COMMAND in pwd do time ${COMMAND} done | sed "s/^/ ... (4 Replies)
Discussion started by: 2dumb
4 Replies

9. UNIX for Advanced & Expert Users

problem with redirect stdout to file

Hi all hope you can help as I am going MAD!!! :eek: The below is in a shell script but the redirection in the sed line does not work and outputs to the screen and the $fname_2 does note get created ????? Can any one help ?? #!/bin/ksh cd /app/ for fname in `ls -1 X*` do sed 1d $fname... (3 Replies)
Discussion started by: mlucas
3 Replies
Login or Register to Ask a Question
Arch::LiteWeb(3pm)					User Contributed Perl Documentation					Arch::LiteWeb(3pm)

NAME
Arch::LiteWeb - simple way to access web pages SYNOPSIS
my $web = Arch::LiteWeb->new; my $content = $web->get("http://some.domain:81/some/path"); die $web->error . " while processing " . $web->request_url unless $content; my $content_type = $web->response_headers->{content_type}; DESCRIPTION
This class provides a basic and easy to use support for the client-side HTTP. It is supplied in order to avoid dependency on LWP. If such dependency is not a problem, consider to use LWP instead that provides much better support for HTTP and other protocols. METHODS
The following class methods are available: get, post, request_url, error, error_with_url, network_error, response_code, response_codestr, response_error, response_headers, response_content. get url [params ...] Execute HTTP get of the given url and return the html string or undef on network/response error. Use other methods to get the details about the error and the response. params is key-value hash, the following keys are supported: url_host - only used if url is none url_port - only used if url is none(80) url_path - only used if url is none endl - default is "1512" timeout - default is 20 seconds user_agent - default is "Arch::LiteWeb/0.1" nocache - add a no-cache header noredirect - don't follow redirect responses max_redirect_depth - default is 5 use_proxy - default is false proxy_url - proxy url ($http_proxy supported too) proxy_host - only used if proxy_url is none proxy_port - only used if proxy_url is none(80) post url input [params] Not implemented yet. request_url Actual url of the last issued request or undef. If partial redirect responses are enabled, then the result is the last (non-redirect) url. error If the last request resulted in error (i.e. get/post returned undef), then this method returns the error message, otherwise it returns undef. This is just a shortcut for network_error || response_error. error_with_url Like error, but with " while fetching request_url " text appended if non undef. network_error The network error message for the last request or undef. response_error The response error message for the last request or undef. response_code The last response code (integer) or undef. response_codestr The last response code (string) or undef. response_headers The last response headers (hashref of HTTP headers) or undef. response_content The last response content or undef. This is the same thing that the last get/post returns. BUGS
Not intended for use in mission-critical applications. AUTHORS
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel). SEE ALSO
For more information, see LWP, LWP::Simple. perl v5.10.1 2005-03-25 Arch::LiteWeb(3pm)