/    Sign up×
Community /Pin to ProfileBookmark

.htaccess file

I have the follow rules in my file, the account link work, go to tickets or password and i just get the account page, assume it’s getting the first account folder.. how can I fix this?

RewriteRule ^account account.php [NC]
RewriteRule ^account/tickets account-tickets.php [NC]
RewriteRule ^account/password change-password.php

to post a comment
HTMLPHPWeb Hosting

1 Comments(s)

Copy linkTweet thisAlerts:
@grahamrodrigueApr 23.2024 — Hello,

It seems you’re dealing with URL rewriting in your .htaccess file. Let’s break down the rules you’ve provided:

RewriteRule ^account account.php [NC]: This rule redirects requests for /account to account.php. The [NC] flag makes the rule case-insensitive.
RewriteRule ^account/tickets account-tickets.php [NC]: Similarly, this rule redirects requests for /account/Doglikesbest/tickets to account-tickets.php.
RewriteRule ^account/password change-password.php? .htaccess file: Unfortunately, the third rule appears to be incomplete or incorrect. It lacks a valid pattern and substitution.
To address the issue, let’s focus on the third rule. If you want to rewrite requests for /account/password to a specific PHP file, you need to provide a valid pattern and substitution. Here’s an example of how you might structure it:

RewriteRule ^account/password$ change-password.php [NC,L]

Make sure to adjust the file paths and filenames according to your actual directory structure.
×

Success!

Help @kiwis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.30,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...