Jump to content

Rewrite a specific url


2504mac8

Recommended Posts

Hi,

 

I tried to redirect to another page when a user type a specific url that doesn't exist.

 

example the user entered

 

http://www.company.com:4443/test/page?_pageid=33,66868&_info=myinfo&_temp=TEMP

 

This url is not existing but I want to redirect the user to http://www.company.com:4443/official/main

 

I tried with a RewriteRule but it doesn'y work.

 

RewriteRule ^/test/page?_pageid=33,66868&_info=myinfo&_temp=TEMP$ /official/temp [L]

 

How can I do?

 

Link to comment
https://forums.phpfreaks.com/topic/132569-rewrite-a-specific-url/
Share on other sites

Is the rewrite rule in a .htaccess file or in the Apache configuration?

 

If its in the .htaccess file try removing the beginning slashes like so:

RewriteRule ^test/page?_pageid=33,66868&_info=myinfo&_temp=TEMP$ official/temp [L]

 

Let me know if it works or not.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.