fatshoesday Posted May 8, 2008 Posted May 8, 2008 I have posted this at the end of a thread in another category but I think it's getting lost. I have therefore start a new thread in the hope of getting a fast response. We got IASP rewrite installed on our server, unfortunately I am clueless. The version works with apache regular expressions and .htaccess. I have had a go a writing a rule. Can you let me know what you think? I tried using regular expression and what I am trying to do is redirect every url request that contains /content.aspx (in a URL like this http://www.mysite.co.uk/content.aspx?...A-4CDDD0232596) to /index.php It goes like this Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite\.co\.uk$ [NC] RewriteRule ^content\.aspx.*$ http://www.mysite.co.uk/$1 [R=301,L] What do you think? Will this do what I want it to do? Jax
fatshoesday Posted May 8, 2008 Author Posted May 8, 2008 I have posted this at the end of a thread in another category but I think it's getting lost. I have therefore start a new thread in the hope of getting a fast response. We got IASP rewrite installed on our server, unfortunately I am clueless. The version works with apache regular expressions and .htaccess. I have had a go a writing a rule. Can you let me know what you think? I tried using regular expression and what I am trying to do is redirect every url request that contains /content.aspx (in a URL like this http://www.mysite.co.uk/content.aspx?...A-4CDDD0232596) to /index.php It goes like this Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite\.co\.uk$ [NC] RewriteRule ^content\.aspx.*$ http://www.mysite.co.uk/$1 [R=301,L] What do you think? Will this do what I want it to do? Jax Sorry to be a pest but we are really needing to move and I need to know if I have this right. Thanks Jax
spax Posted May 9, 2008 Posted May 9, 2008 I don't know too much about ISAPI but you don't need to rewrite the URL. As you stated in your post, you only need to redirect a request for content.aspx to www.your_domain.com - so long as index.php is served by that request. Even though ISAPI uses Apache type directives (mod_rewrite), .htaccess is Apache specific so won't work on a Windows server. Your ISAPI filter will need to be somewhere else, the httpd.ini file or a local one. Wouldn't it be easier to place a 301 redirect into content.aspx, in place of the code there now? You need to bear in mind also, that if you have lots of dynamic pages generated from content.aspx and they have been indexed, you will lose your SERPs if you redirect them all to index.php
fatshoesday Posted May 9, 2008 Author Posted May 9, 2008 I don't know too much about ISAPI but you don't need to rewrite the URL. As you stated in your post, you only need to redirect a request for content.aspx to www.your_domain.com - so long as index.php is served by that request.Even though ISAPI uses Apache type directives (mod_rewrite), .htaccess is Apache specific so won't work on a Windows server. Your ISAPI filter will need to be somewhere else, the httpd.ini file or a local one. Wouldn't it be easier to place a 301 redirect into content.aspx, in place of the code there now? You need to bear in mind also, that if you have lots of dynamic pages generated from content.aspx and they have been indexed, you will lose your SERPs if you redirect them all to index.php According to our host the new version of ISAPI_Rewrite can use .htaccess files on a windows server. apparently is also uses alot of the standard mod_rewrite regular expression. Is there a simple way of writing the a rule to redirect a full url. for example if I put the whole thing in (). Thanks for getting back to me.
spax Posted May 9, 2008 Posted May 9, 2008 Like I said, if you want every request for content.aspx redirected, a header 301 is probably the easiest way. Look here for a couple of examples for ASP and ASP.NET http://www.seoconsultants.com/tips/asp/301.asp
fatshoesday Posted May 9, 2008 Author Posted May 9, 2008 Like I said, if you want every request for content.aspx redirected, a header 301 is probably the easiest way. Look here for a couple of examples for ASP and ASP.NET http://www.seoconsultants.com/tips/asp/301.asp The problem is we were using a content management system. This means we do not have access to the headers. And the provider is not willing to do it for us. Therefore, I believe the only thing we can do is rewrite requested urls coming into our new server. Thanks for all you help Jax
Recommended Posts
Archived
This topic is now archived and is closed to further replies.