Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
mod rewrite help
I need to rewrite some URL's using Mod ReWrite Apache Module. Below is the incoming URL
This needs to be rewrited to below url
Anyone please help me out with .htaccess file. I need this only for subdomain. so I assume we need to place this .htaccess in subdomain directory only.
Thanks in advance.
Apache Web Server
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Looks like its not working.
I am getting the same old URL.
Any other additional steps to make sure apache takes .htaccess?
Is any RewriteRule working there? Verify the apache log.
To use RewriteEngine You need to be allowed to Override FileInfo. Refer
Also - You may need set RewriteBase (or change the rule) if the .htaccess is placed not in root of VirtualHost
Yeah top domain is working. I tested with wordpress permlinks.
This is info in my httpd.conf
.htaccess is placed under root folder i,e /var/www/domain/subdomain
Error log says 302 not found. Please let me know if u need additional information.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Got to working... after moving to http.conf.
Ah - my fault. in htaccess the leading / is stripped.
RewriteRule ^story/(.*) /story.php?id=$1 [L]
Looks like id is not supplied to the rewrited URL. It just showing me blank page. Any idea?
to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Its working if I replace the rule with this
RewriteRule ^story/([0-9][0-9])/$ /story.php?id=$1 [L]
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent