Paul Singh
Paul Singh

Reputation: 11

Apache Redirect

I have a question regarding redirecting to a specific page. I have the following working

Redirect /inventoryForm /Form.html

Work flawless! But, if the URL is

localhost/inventoryForm/form/test.... it goes to localhost/Form.html/form/test..

I only want it to go to Form.html if someone goes to /inventoryForm, regardless if they have form/test...etc

Thank you

Upvotes: 1

Views: 157

Answers (1)

OlivierS
OlivierS

Reputation: 75

I would suggest using RedirectMatch , or mod_rewrite instead of mod_alias. RedirectMatch doc

RedirectMatch /inventoryForm /Form.html

or RewriteRule /inventoryForm /Form.html [R=302]

Upvotes: 1

Related Questions