Forum Moderators: phranque

Message Too Old, No Replies

How is correct search engine and campaign managed file called .htacces

         

toplisek

1:10 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have created .htaccess file.


ErrorDocument 404 /errror/error.php [L]
#
RewriteEngine On
#
Options +FollowSymlinks
#
RewriteRule ^index\.html$ index.php [L]
#
RewriteRule ^AllboutUs\.html$ mycompany.php [L]
#
Redirect permanent /enews http://example.com/news/index.php?utm_source=ote_news&utm_medium=email
&utm_content=textlink&utm_campaign=content%2Bannounce

Please inform me if
1. this file is always in root directory where it will influence code to rewrite?
2. my error page will be always shown when there is wrong URL by user within web site?
3. How to prepare correct .htaccess for email campaign or my code is correct like Redirect permanent /enews and other part
4. How to prepare file also for banner ads with redirection within .htaccess file

thank you for replies.

[edited by: jdMorgan at 2:17 pm (utc) on April 4, 2008]
[edit reason] Fixed [ code ] formatting & side-scroll, use example.com [/edit]

Samizdata

1:29 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Please inform me

An .htaccess file is used to override (where allowed) the configuration of an Apache webserver.

It is not HTML and none of the code you posted will work.

There are many examples in the forum Library and in previous posts, which you really should read.

But only if your site is hosted on an Apache server.

toplisek

1:39 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi, can you be please more specific? What is not correct?

jdMorgan

2:22 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your questions can only be answered by your testing. There are too many server-configuration variations for us to look at your code and say, "Yes, that will work."

You need to test it on your server, or set up a development server that you can test it on.

That said, you code looks OK, although I recommend that you do not mix mod_rewrite and mod_alias directives if you want to control their order of execution.

Jim

toplisek

2:34 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi,
thank you for your good answer. What is is hear mod_alias directives?
What will happen if I put in newsletter link to folder enews? Should be made also rewrite code to the landing page as my code for ads measurement is to track enews within google like:
Redirect permanent /enews http://example.com/news/index.php?utm_source=ote_news&utm_medium=email
&utm_content=textlink&utm_campaign=content%2Bannounce

Can you help me and maybe provide me correct code in case of this sample for campaign tracking statistics?