1

I have a wordpress installation, and it runs the following .htaccess:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /TestWordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /TestWordpress/index.php [L]
</IfModule>

# END WordPress

And I have a page named checkout, so I want the following

Everytime the /checkout/ page is loaded, add a parameter at the end: /checkout?myparam=1

I've tried the following

# add a trailing param to /checkout
RewriteRule ^([_0-9a-zA-Z-]+/)?checkout/$ $1checkout?myparam=1 [R=301,L]

also without the R=301, but still does not work.

Any help would be apreciated.

Thanks a ton!

1 Answer 1

1

Try this rule just below RewriteBase /TestWordpress/ line:

RewriteRule (^|/)checkout/?$ $0?myparam=1 [QSA,NC,L]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.